lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Multi Phrase Search at the Beginning of a field
Date Mon, 01 Sep 2008 12:50:53 GMT

Can some one please help me in providing a solution for my problem:

I have a single field defined in my document. Now I want to do a
MultiPhraseQuery - but at the beginning of the field. 

For e.g: If there are 3 documents with single field ( say 'title' ) has
the values -> "Hello Love you", "Love You Sister", "Love Yoxyz" 

Then my search for "Love yo*" ->  MultiPhraseQuery with first term
"Love" ( using addTerm("Love") and the next terms ( using addTerms("Yo*"
- after getting all terms 'You' and 'Yoxyz' using IndexReader.terms(Yo)
) should return only the documents "Love You Sister", "Love Yoxyz" - but
not "Hello Love you".

Can some one please help me on how to get it done.


View raw message