lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Swanhart <>
Subject Re: Search speed
Date Tue, 02 Nov 2004 18:32:00 GMT
If you know all the phrases your are going to search for, you could
modify an analyzer to make those phrases into whole terms when you are

Other than that, you can test the speed of breaking the phrase query
up into term queries.  You would have to do an AND on all the words in
the phrase.  You would then need to
get the documents that match all the terms, then do a substring search
for your exact phrase.  Any documents that match you would then

search: death && notice
for each hit
  if contents contains "death notice"
    add hit to final result list

On Tue, 2 Nov 2004 18:07:26 +0100, Paul Elschot <> wrote:
> On Tuesday 02 November 2004 17:50, Jeff Munson wrote:
> > Thanks for the info Paul.  The requirements of my search engine are that
> > I need to search for phrases like "death notice" or "world war ii".  You
> > suggested that I break the phrases into words.  Is there a way to break
> > the phrases into words, do the search, and just return the documents
> > with the phrase?  I'm just looking for a way to speed up the phrase
> > searches.
> If you know the phrases in advance, ie. before indexing, you can index
> and search them as terms with a special purpose analyzer.
> It's an unusual solution, though.
> Regards,
> Paul Elschot
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message