Did you consider using shingles?
It solves the "to be or not to be" problem quite nicely.

Dawn

On 24/07/2013 12:34, Ankit Murarka wrote:
I tried using Phrase Query with slops. Now since I am specifying the slop I also need to specify the 2nd term.

In my case the 2nd term is not present. The whole string to be searched is still 1 single term.

How do I skip the holes created by stopwords. I do not know before hand how many stop words are skipped and what string user is going to enter.

Is there a definite way to skip the holes created by stopwords.

I was now looking for MultiphraseQuery splitting the user provided string on space and providing each word as a term to multiphrasequery.

Will it help..?? Is there any alternative. ??

On 7/24/2013 4:48 PM, Michael McCandless wrote:
PhraseQuery?

You can skip the holes created by stopwords ... e.g. QueryParser does
this.  Ie, the PhraseQuery becomes "X David _ _ manager _ _ company"
if is/a/of/the are stop words, which isn't perfect (could return false
matches) but should work well in practice ...

Mike McCandless

http://blog.mikemccandless.com


On Wed, Jul 24, 2013 at 4:31 AM, Ankit Murarka
<ankit.mura...@rancoretech.com>  wrote:
Dear All,

Say suppose I have 3 documents. The sample text is

/*File 1 : */

Mr X David is a manager of the company. He is the senior most manager. I
also want to become manager of the company.

/*File 2 :*/

Mr X David manager of the company is also very senior. He happens to be the
senior most manager. I wish even I could reach that place.

/*File 3:*/

Mr X David is working for a company. He happens to be the manager of the company.Infact he is the senior most manager. I dont want to become like
him.

/*String I wish to search :* X David is a manager of the company./

Ideally I should get only file1 in the hit result.

I have no clue how to achieve this. Basically I am trying to match the part of the sentence or a complete sentence. What can be the best methodology. I presume is a are the stop words and will be skipped during indexing by the
StandardAnalyzer.

What wonders me how do I then search for a part of the sentence or complete
sentence if sentence contains some/many stopwords.

I am using StandardAnalyzer. Please guide.

--
Regards

Ankit

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





--

Rgds.
*Dawn Raison*
Technical Director, Digitorial Ltd.

E:d...@digitorial.co.uk W:http://www.digitorial.co.uk
M: 07956 609 618                T: 01428 729 431
Reg: 04644583, England & Wales
Church Villas Ecchinswell, Newbury, RG20  4TT

This email and any attached files are for the exclusive use of the addressee and may contain privileged and/or confidential information. If you receive this email in error you should not disclose the contents to any other person nor take copies but should delete it immediately. Digitorial Ltd makes no warranty as to the accuracy or completeness of this email and accepts no liability for its contents or use. Any opinions expressed in this email are those of the author and do not necessarily reflect the opinions of Digitorial Ltd.

Reply via email to