> DateField has a utility method to return a String:
> 
>       DateField.timeToString(file.lastModified())
> 
> You'd use that String to pass to Field.UnStored.
> 
> I recommend, though, that you use a different format, such as the 
> YYYY-MM-DD format you're using.

Well, I read YYYY-MM-DD format string from a database.
So, I need to know how to convert YYYY-MM-DD to DateField.timeToString()'s 
result format.
Or I have to convert YYYY-MM-DD to file.lastModified()'s format which I can 
pass to
DateField.timeToString().
What is the easiest solution?

> In Lucene's latest codebase (though not in 1.4.x) includes RangeFilter 
> which would do the trick for you.  If you want to stick with Lucene 
> 1.4.x, that's fine... just grab the code for that filter and use it as 
> a custom filter - its compatible with 1.4.x.

So, why do you recommend RangeFilter over DateFilter?
Does it require less index data or/and has it better performance?
(I'm using 1.4.2)

> It depends on whether you instantiate a new filter for each search.  
> Building a filter requires scanning through the terms in the index to 
> build BitSet for the documents that fall in that range.  Filters are 
> best used over multiple searches.

Simply saying:
I let the user to enter the search string on a HTML form, then I call my custom 
lucene-based java
class through command line (the calling method may change to the PHP-to-JAVA 
bridge if it'll be
perfect for my needs).
So, every search is a whole new round. New HTML FORM post -> new command line 
JVM call -> new
index searcher, etc...

The OS is caching the index file pretty well (only the memory size is the limit 
of course).

Will my implementation's performance drop down a lot when I implement 
DateFilter?

Regards,
Sanyi


                
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to