lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Willnauer <>
Subject Re: Index searching problem
Date Wed, 27 Jan 2010 09:45:27 GMT
do you close your index writer or commit it before you open your searcher?

one more thing, if you search for "Hotel" you might not find anything
if the querystring is not passed through the StandardAnalyzer you use
for indexing. (well, or another analyzer that does lowercasing).
BTW. you email is hard to read though - I don't see a single newline.


On Wed, Jan 27, 2010 at 10:40 AM, Asif Nawaz <> wrote:
> i build an index to store 100 docs, each with field author, title and abstract.for (i=0;i<100;i++)
{writer = new IndexWriter("index",new StandardAnalyzer(),true,IndexWriter.MaxFieldLength.UNLIMITED);
        doc.add(new Field("author",cfcDoc.getAu(), Field.Store.YES, Field.Index.TOKENIZED));doc.add(new
Field("title",cfcDoc.getTi(), Field.Store.YES, Field.Index.TOKENIZED));doc.add(new Field("abstract",cfcDoc.getAb(),
Field.Store.YES, Field.Index.TOKENIZED));writer.addDocument(doc);}
> But when i perfrom a search, it returns zero results, even querystring exist in one of
the field of document. why is it so?????
> Hits hits = se.performSearch("Hotel");System.out.println("hits length = "+ hits.length());
> It creates index folder in file system, but when i open the file _0.fdt or _0.fdx with
Luke. this shows nothing... it also deletes the file from file system.
> Asif
> _________________________________________________________________
> Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.

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

View raw message