lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <paul.elsc...@xs4all.nl>
Subject Re: optimizing single document searches
Date Wed, 28 Feb 2007 19:41:08 GMT
On Wednesday 28 February 2007 01:01, Russ wrote:
> I will definatelly check it out tommorow.
> 
> I also forgot to mention that I am not interested in the hits themselves, 
only whether or not there was a hit.  Is there something I can use that's 
optimized for this scenario, or should I look into rewriting the search 
method of the indexarsearcher?  Currently I just check hits.size().

For a single document: get the Scorer from the Query via Weight.
Then check the return value of Scorer.next(), it will indicate whether
the only doc matches the query.

Regards,
Paul Elschot.


> 
> Russ
> Sent wirelessly via BlackBerry from T-Mobile.  
> 
> -----Original Message-----
> From: "Erick Erickson" <erickerickson@gmail.com>
> Date: Tue, 27 Feb 2007 18:49:45 
> To:java-user@lucene.apache.org
> Subject: Re: optimizing single document searches
> 
> Which is very, very cool. I wound up using it for hit counting and it
> works like a charm....
> 
> On 2/27/07, karl wettin <karl.wettin@gmail.com> wrote:
> >
> >
> > 28 feb 2007 kl. 00.25 skrev Ruslan Sivak:
> > ]
> >
> > > On a single document of 10k characters, doing about 40k searches
> > > takes about 5 seconds.  This is not bad, but I was wondering if I
> > > can somehow speed this up.
> >
> > Your corpus contains only one document? Try contrib/memory, an index
> > optimized for that scenario.
> >
> > --
> > karl
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
> 
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message