One variant on Upayavira's comment would be to use
the proximity as a boost query. That way all three would
match, but the first two would get higher scores.

Either way should work though.

Best
Erick


On Fri, Jun 28, 2013 at 6:29 AM, Upayavira <u...@odoko.co.uk> wrote:

> you might use proximity. "low blood pressure"~6 might match #1 and #2
> but not #3.
>
> It says find phrases that require six or less position moves in order to
> match my terms as a phrase.
>
> Upayavira
>
> On Fri, Jun 28, 2013, at 11:10 AM, venkatesham.gu...@igate.com wrote:
> > My search query is having multiple words ranging from 3 to 8 and a
> > context
> > attached to it. I am looking for the search result documents which should
> > have all the terms which are there in query and also terms in the
> > document
> > should relate or have the similar context.
> >
> > For example: my search query is "Low blood pressure"
> > Documents which have part of text like below
> > 1. I am having lower blood pressure.
> > 2. my blood pressure was very low
> > 3. I also take atenolol and norvasc for high blood pressure but never
> > heard
> > of the protonix causing low magnesium
> >
> > If I search for all words in the document, result will have 3 documents
> > but
> > 3rd one even though its a keyword match but it has no context with "Low
> > blood pressure".
> > If I search for phrase search "Low blood pressure", the result will have
> > only 1 document, other 2 will not match even though 2nd document is a
> > probable match
> >
> > to make my search little intelligence on context, what are the features
> > solr
> > provides.
> >
> > Thanks.
> >
> >
> >
> > --
> > View this message in context:
> > http://lucene.472066.n3.nabble.com/Context-search-in-solr-tp4073882.html
> > Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to