You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Hannes Carl Meyer <ha...@googlemail.com> on 2012/02/23 13:06:36 UTC

Range Query with sensitive Scoring

Hello,

I have an Integer field which carries a value between 0 to 18.

Ist there a way to query this field fuzzy? For example search for field:5
and also match documents near it (like documents containing field:4 oder
field:6)?

And if this is possible, is it also possible to boost exact matches and
lower the boost for the fuzzy matches?

Thanks in advance and kind regards

Hannes

Re: Range Query with sensitive Scoring

Posted by Ahmet Arslan <io...@yahoo.com>.
> I have an Integer field which carries a value between 0 to
> 18.
> 
> Ist there a way to query this field fuzzy? For example
> search for field:5
> and also match documents near it (like documents containing
> field:4 oder
> field:6)?
> 
> And if this is possible, is it also possible to boost exact
> matches and
> lower the boost for the fuzzy matches?
> 

Yes it is possible with query manipulation. 

If you are using lucene query parser,  q=+field:{4 TO 6} field:5^10 
if you are using edismax query parser q=field:{4 TO 6}&bq=field:5^10