matching sub phrases in user entered query...

2008-07-14 Thread Preetam Rao
Hi, Sorry if you get this mail second time. Having some trouble with mail box. Is there a query in Lucene which matches sub phrases ? For example if the document text is "new york existing homes *3 bed 2 bath*homes 3 miles from city center 2 rooms" and if user enters "Brooklyn homes with *3 bed

matching sub phrases in user entered query...

2008-07-14 Thread Preetam Rao
Hi, Sorry if you get this mail second or third time. Getting mail delivery errors from gmail for some unknown reason. This is my last attempt at sending the mail for the day.. :-) Is there a query in Lucene which matches sub phrases ? For example if the document text is "new york existing homes

RE: matching sub phrases in user entered query...

2008-07-14 Thread Steven A Rowe
Hi Preetam, On 07/14/2008 at 1:40 PM, Preetam Rao wrote: > Is there a query in Lucene which matches sub phrases ? > [snip] > > I was redirected to Shingle filter which is a token filter > that spits out n-grams. But it does not seem to be best solution > since one does not know in advance what n

Re: matching sub phrases in user entered query...

2008-07-14 Thread Preetam Rao
Hi Steve, It would be simpler if I have a query called SubPhraseQuery in which case I do not have to either generate extra terms during ingestion or generate extra queries during querying. As a user, the best I would hope for is, to ingest the data from some feed into different fields, run the use

Re: matching sub phrases in user entered query...

2008-07-15 Thread Karl Wettin
Couldn't you create multiple "shingle phrase queries" from the user query and add them all to a BooleanQuery? "example input query"^10 OR "example input"^5 OR "input query"^5 SpanNear and PhraseQueries are rather expensive though. Not too long ago I replaced phrase queries with a shingles in

Re: matching sub phrases in user entered query...

2008-07-15 Thread Preetam Rao
That is very good performance. But, If I take, on an average, 6 terms per user query, and looking at shingles of size 2 I will have a boolean OR of 5 shingle phrase queries. How better is this compared to a single sub phrase query which would internally be just like another phrase query with som

RE: matching sub phrases in user entered query...

2008-07-15 Thread Preetham B.R
Hi Steve, It would be simpler if I have a query called SubPhraseQuery in which case I do not have to either generate extra terms during ingestion or generate extra queries during querying. As a user, the best I would hope for is, to ingest the data from some feed into different fields, run the use