Proximity Search between phrases

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Proximity Search between phrases

Vasudevan Comandur
Hello,

    I am new to using Lucene Indexing Server and to query syntax as well. I
went through the documentation about using proximity searches between 2
words.

    But I would like to use proximity searches between two phrases. How do I
construct the Query for Lucene to fetch the relevant documents.?

    For Ex. The query is "Economic Meltdown in Asian Countries" and the two
phrases are "Economic Meltdown" and "Asian Countries". I would like to
    use proximity search between the two phrases.

   How can I construct the Lucene query for proximity search between two
phrases.

   I appreciate your help on this.

Regards
 Vasu
Reply | Threaded
Open this post in threaded view
|

Re: Proximity Search between phrases

Cool The Breezer
You could you phrase queries also like "Economic Meltdown" AND "Asian Countries". but these phrases may be too distant from one another to be relevant for your searching purposes.
To get better result wrt position(distance between phrases), you can use SpanNearQuery.

Let me know if you need more help.

regards,
RB


--- On Sun, 12/28/08, Vasudevan Comandur <[hidden email]> wrote:

> From: Vasudevan Comandur <[hidden email]>
> Subject: Proximity Search between phrases
> To: [hidden email]
> Date: Sunday, December 28, 2008, 4:19 PM
> Hello,
>
>     I am new to using Lucene Indexing Server and to query
> syntax as well. I
> went through the documentation about using proximity
> searches between 2
> words.
>
>     But I would like to use proximity searches between two
> phrases. How do I
> construct the Query for Lucene to fetch the relevant
> documents.?
>
>     For Ex. The query is "Economic Meltdown in Asian
> Countries" and the two
> phrases are "Economic Meltdown" and "Asian
> Countries". I would like to
>     use proximity search between the two phrases.
>
>    How can I construct the Lucene query for proximity
> search between two
> phrases.
>
>    I appreciate your help on this.
>
> Regards
>  Vasu


     

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]