Custom rescorer REST request example


(Vitlalii Glazkov) #1

Hi,

I have a simple issue. I'm trying to create to my custom rescorer plugin and I've started with this elasticsearch out of the box example: https://github.com/elastic/elasticsearch/blob/master/plugins/examples/rescore/src/main/java/org/elasticsearch/example/rescore/ExampleRescoreBuilder.java

I can successfully install my plugin in the elasticsearch, after that I'm starting elasticsearch client in the debug mode with the following command:

ES_JAVA_OPTS="-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=y" ./elasticsearch

and I can successfully connect my debugger to the elasticsearch client and I can see that I'm hitting breakpoint inside my overriden method:

public List<RescorerSpec<?>> getRescorers()

After that I'm trying to send request that will hit breakpoint in the rescore method. Here's the request (I took it from elasticsearch docs):

POST /_search { "query" : { "match" : { "text" : { "operator" : "or", "query" : "The quick brown" } } }, "rescore" : { "window_size" : 50, "query" : { "rescore_query" : { "match_phrase" : { "text" : { "query" : "The quick brown", "slop" : 2 } } }, "query_weight" : 0.7, "rescore_query_weight" : 1.2 } } }

but have no luck.


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.