Have a look at our demo and test suite. Those contain a few code samples I
think you'll find useful.

Generally, you'll indeed have to either close the writer before openning the
searcher and searching, or flush it, in order to perform searches on an
index being currently indexed. Also, I might even consider storing the
document names / paths in a local storage instead of querying the CLucene
index. It might prove to be faster (depands on the amount of documents
you're indexing of course...).

Itamar. 

-----Original Message-----
From: Henning Meyer [mailto:[email protected]] 
Sent: Wednesday, December 09, 2009 7:36 AM
To: [email protected]
Subject: [CLucene-dev] search after addDocument?

Hi all again,

what am I missing?
I add a Document to an Index and immediatly after this I'm searching for
this doc, but get 0 results.
What am I doing wrong there? Do I need to flush? Really? Or create the
Searcher after the addDocument?
In my app I'm indexing a lot of stuff, and have to check, if certain docs
are already present - so how would I do this?


Henning



------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
CLucene-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clucene-developers

Reply via email to