lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <>
Subject Re: about some seacher(I'm new hand, thank you for help)
Date Fri, 06 Jul 2012 09:13:45 GMT
Split the data into 2 fields, timestamp and content.  Store one lucene
document per line with the 2 fields, timestamp stored and not indexed
(unless you want to search on it), content stored and analyzed.  Use
StandardAnalyzer unless you have special requirements.

Then close the IndexWriter, open a searcher, use QueryParser to get a
query for "content: some message", search, get and display the
timestamp and content fields and you're done.

Googling "lucene tutorial" or "lucene getting started" will get hits.
Or look at the sample/demo code at  Or, best of all, get
hold of a copy of Lucene In Action 2nd. edition.

Or take a look at Solr.


On Fri, Jul 6, 2012 at 4:16 AM, sam <> wrote:
> I want seach a txt ,which is store like  <2012-07-06 11:11:43    some
> message> at one line .How to seach that,I need get the time and content.
> --
> View this message in context:
> Sent from the Lucene - Java Users mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message