lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nada Mimouni" <>
Subject RE: Phrase indexing and searching with Lucene
Date Wed, 18 Feb 2009 13:42:30 GMT

Thank you Erick.

I need first to index phrases, the built-in phrase processing (with double quotes) comes in
the search step.  
Is there any difference between : 
            1) start by indexing phrases and then make a phrase search 
            2) index terms and then search for phrases

To make things clearer:

What I am doing now: 
 - In the indexing step:  I am using "IndexTermGenerator" to generate term based indexes,
one index for all queries I have and another one for documents (term means single word). 
 - In the search step : Lucene matches terms in queries index with terms in documents index.

What I need to do:
 - Index phrases ("multi" words) in addition to terms (single words)
 - Search for both : phrases and terms

Is there any idea on how to proceed?


-----Original Message-----
From: Erick Erickson []
Sent: Wed 2/18/2009 2:10 PM
Subject: Re: Phrase indexing and searching with Lucene
Have you tried the built-in phrase processing with double quotes? e.g.
"this is a phrase"?

See the Term section at


On Wed, Feb 18, 2009 at 5:57 AM, Nada Mimouni <> wrote:

> Hello everybody,
> I use Lucene to index and search into text documents.
> At present, I just index and search for single words. I want to extend this
> to phrases (or nGrams).
> Could anyone please give me details on how to index phrases and then make a
> phrase search?
> Thank you very much in advance for your help.
> Nada Mimouni
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message