* And what's about visibility filter? * Are you sure no one else accesses
IndexReader and modifies index? See reader.maxDocs() to be confident.
On Fri, Sep 5, 2008 at 12:19 AM, Justin Grunau <[EMAIL PROTECTED]> wrote:
> We have some code that uses lucene which has been working perfectly well
> for several months.
>
> Recently, a QA team in our organization has set up a server with a much
> larger data set than we have ever tested with in the past: the resulting
> lucene index is about 3G in size.
>
> On this particular server, the same lucene code which has been reliable in
> the past is now exhibiting erratic behavior. The first time you do a
> search, it returns the correct number of hits. The second time you do a
> search, it may or may not return the correct set. By the third time you do
> a search, it will return 0 hits even for a search that was returning
> hundreds of hits only a few seconds earlier. All subsequent searches will
> return 0 hits until you stop and restart the java process.
>
> A snippet of the relevant code follows:
>
> // getReader() returns the singleton IndexReader object
> final IndexReader reader = getReader();
>
> // ANALYZER is another singleton
> final QueryParser queryParser = new QueryParser("text",
> ANALYZER);
> queryParser.setDefaultOperator(spec.getDefaultOp());
> final Query query =
> queryParser.parse(spec.getSearchText()).rewrite(
> reader);
> final IndexSearcher searcher = new IndexSearcher(reader);
>
> final Hits hits = searcher.search(query, new
> CachingWrapperFilter(
> new QueryWrapperFilter(visibilityFilter)));
> total = hits.length();
>
>
>
> I understand that Lucene should be able to handle very large datasets, so
> I'd be surprised if this were an actual Lucene bug. I'm hoping it's just
> that I'm doing something "wrong" which has gone unnoticed so far for several
> months because we've never had an index this large.
>
> We're using lucene verison 2.2.0.
>
> Thanks!
>
> Justin Grunau
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Bests regards,
Leonid Maslov!
Personal blog: http://leonardinius.blogspot.com/
Random thought:
Princess Margaret - "I have as much privacy as a goldfish in a bowl."