custom_score query support just pushed to master. This allows to easily
control the scoring (or completely replace) of a query based on the query
score and other document field values. Much more is explained in the issue: http://github.com/elasticsearch/elasticsearch/issues/220, but here is a
simple sample:
Yes, it similar in spirit to function queries, it is actually modeled after
Lucene custom score query (but not used directly). Why do you say its a
basic version of function queries, is there something you can do with the
other that you can't do with this?
Yeah, I purposely said "basic" simply because I wasn't sure whether
the new "script" stuff can be used to do all those things listed on http://wiki.apache.org/solr/FunctionQuery . Can it? It would be
great to list a few examples somewhere, so we can get a better idea.
For example, can the "script" functionality be used for these
(randomly picked from the above Wiki page):
Yes, it similar in spirit to function queries, it is actually modeled after
Lucene custom score query (but not used directly). Why do you say its a
basic version of function queries, is there something you can do with the
other that you can't do with this?
This is just mvel script running, you can do what you want with it, its
basically code... . So, you can do all of the above and much much more since
you are not bounded by static functions.
Yeah, I purposely said "basic" simply because I wasn't sure whether
the new "script" stuff can be used to do all those things listed on http://wiki.apache.org/solr/FunctionQuery . Can it? It would be
great to list a few examples somewhere, so we can get a better idea.
For example, can the "script" functionality be used for these
(randomly picked from the above Wiki page):
Yes, it similar in spirit to function queries, it is actually modeled
after
Lucene custom score query (but not used directly). Why do you say its a
basic version of function queries, is there something you can do with the
other that you can't do with this?
This is just mvel script running, you can do what you want with it, its
basically code... . So, you can do all of the above and much much more since
you are not bounded by static functions.
Yeah, I purposely said "basic" simply because I wasn't sure whether
the new "script" stuff can be used to do all those things listed on http://wiki.apache.org/solr/FunctionQuery. Can it? It would be
great to list a few examples somewhere, so we can get a better idea.
For example, can the "script" functionality be used for these
(randomly picked from the above Wiki page):
Yes, it similar in spirit to function queries, it is actually modeled
after
Lucene custom score query (but not used directly). Why do you say its a
basic version of function queries, is there something you can do with the
other that you can't do with this?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.