How to reorder fuzzy search results


(Makanju Dami Perfect) #1

Hello,

I'm trying to create a correction search for one of my projects. And i'm
currently using fuzzy search, but the scoring of the results are not
helpful.

For example, when i do this search:

curl XPOST http://localhost:9200/deals/hotels/_search
{
"from":0,
"size":7,
"query":{"fuzzy":{"hotelname":"wise"}}
}

I get the following results:

Mike White Hotels - score:* 2.9329195*
Think Twice - score:* 2.756144*
White House Hotel - score: 2.2049153
Nice Time Hotel - score: 2.065069
De Wise Hotel Odo Ona - score: 1.9627647
Under The Wave - score: 1.6577798
*
*
The result is fine, but i need the ordering to be better, that is, I need
'De Wise Hotel' to be matched first with a higher score before other fuzzy
calculated results.

I'm new to elastic search, so your help would be greatly appreciated.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Mark Harwood) #2

See https://github.com/elasticsearch/elasticsearch/issues/3125

I expect this is down to a core Lucene issue in that the default FuzzyQuery
class has a bias towards rare terms rather than good matches. I addressed
this problem with the "FuzzyLikeThis" alternative Query class.
ElasticSearch docs for this alternative are here
http://www.elasticsearch.org/guide/reference/query-dsl/flt-query/

I haven't tried this in ES but I have generally found FLT provides saner
ranking of results.

Cheers
Mark

On Wednesday, September 11, 2013 9:00:03 AM UTC+1, Makanju Dami Perfect
wrote:

Hello,

I'm trying to create a correction search for one of my projects. And i'm
currently using fuzzy search, but the scoring of the results are not
helpful.

For example, when i do this search:

curl XPOST http://localhost:9200/deals/hotels/_search
{
"from":0,
"size":7,
"query":{"fuzzy":{"hotelname":"wise"}}
}

I get the following results:

Mike White Hotels - score:* 2.9329195*
Think Twice - score:* 2.756144*
White House Hotel - score: 2.2049153
Nice Time Hotel - score: 2.065069
De Wise Hotel Odo Ona - score: 1.9627647
Under The Wave - score: 1.6577798
*
*
The result is fine, but i need the ordering to be better, that is, I need
'De Wise Hotel' to be matched first with a higher score before other fuzzy
calculated results.

I'm new to elastic search, so your help would be greatly appreciated.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(marker) #3

Any luck doing with that? I have reviewed the links provided. However, no luck.


(system) #4