Anyway to boost a query by fields an term proximity (similar to EDISMAX in SOLR)


(Niccolò Becchi) #1

Is there anyway to configure a query in a similar way as edismax in SOLR
that's taking care about term proximity and boosting by fields?
I have spend days but actually I haven't found any good solution with
elasticsearch

That's an example of edismax in SOLR (
http://wiki.apache.org/solr/ExtendedDisMax ):

params.set("q", "london market bonds");
params.set("qf", "subject title^5");
params.set("pf", "subject^10 title^50");
params.set("ps", "10");
params.set("pf2", "subject^5 title^25");
params.set("ps2", "20");
params.set("mm", "2");
params.set("tie", "0.8");

It's translated in the following Lucene query:

+(
(
(title:london^5.0 | subject:london)~0.8
(title:market^5.0 | subject:market)~0.8
(title:bonds^5.0 | subject:bond)~0.8
)
~2
)
(subject:"london market bond"~10^10.0)~0.8
(title:"london market bonds"~10^50.0)~0.8
(
(subject:"london market"~20^5.0)~0.8
(subject:"market bond"~20^5.0)~0.8
)
(
(title:"london market"~20^25.0)~0.8
(title:"market bonds"~20^25.0)~0.8
)

With the new Multiple query strings in elasticsearch 1.1 (
http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/multi-query-strings.html) you can do something similar, but you have no control on the terms
proximity.
So, looking for two terms, there is no difference if the two terms are far.
But this feature is too important if you are looking for example for a
person with a query like "Michael Johnson".

Thanks
Niccolo

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/5fc1f929-ddb2-4178-a5da-c87ab81104f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #2