lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonid M." <leoni...@gmail.com>
Subject Re: Problem with lucene search starting to return 0 hits when a few seconds earlier it was returning hundreds
Date Thu, 04 Sep 2008 21:35:47 GMT
* 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 <jjmg01@yahoo.com> 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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


-- 
 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."

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message