lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Armbrust, Daniel C." <Armbrust.Dan...@mayo.edu>
Subject RE: Fields support
Date Thu, 25 Jul 2002 19:41:29 GMT
The date filter does not work for dates before ~1970.

Range query is one approach you can take.

You can also filter the results for a range of dates or numbers.  But since lucene has no
numbers format, you have to take care when you index your numbers or dates, so that they will
sort alphabetically.  Then you can write your own Filter (which will closely mirror the current
date filter) to handle them.

In the case of dates, you need to index them all with this format:

YYYYMMDD

Then they will sort alphabetically, and the filter you have to write will work well.

For other numbers, you have to 0 prefix them out to a standard length.

These are the only two ways I know.  If there's something else/better, please post it.

I never have gotten any response to my question of why is there no native numeric support
in lucene - (Is it really hard, full redesign required, or has it just not been done [and
if it just hasn't been done when might it be done])


Dan

-----Original Message-----
From: Thierry Thelliez [mailto:thelliez@earthlink.net]
Sent: Thursday, July 25, 2002 2:33 PM
To: 'Lucene Users List'
Subject: RE: Fields support


Ok, I think that the file HTMLDocument.java answered some of my
questions (and misunderstandings). Still I don't have really see how
dates are handled. In a recent post someone mentioned some problems with
DateFilter. What is the status of that? Is rangeQuery the way to go for
date interval queries?


Thanks,
Thierry



-----Original Message-----
From: Thierry Thelliez [mailto:thelliez@earthlink.net] 
Sent: Thursday, July 25, 2002 9:43 AM
To: 'Lucene Users List'
Subject: Fields support

I spent some time browsing the archive and the documentation but I could
not find a real explanation of field support in Lucene (if I missed a
document please let me know).

I need to be able to search documents based on their content and on
their creation date. I was then thinking of using a field for the date
but how does one do that?

Assuming that the document is a txt or html file, do I have to add
something like:
‘<creationDate>07/24/02</creationDate>’ 
in the document itself, or is there another place to store this meta
information?

(BTW, our creationDate is not the physical file creation date).

And then how do I build my query to search for a particular day, a
particular day range (I say some posts proposing to use a rangeQuery but
how this ties to my creationDate?).


Thanks,
Thierry



--
To unsubscribe, e-mail:
<mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:lucene-user-help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message