Package org.elasticsearch.index.rankeval
Class RestRankEvalAction
java.lang.Object
org.elasticsearch.rest.BaseRestHandler
org.elasticsearch.index.rankeval.RestRankEvalAction
- All Implemented Interfaces:
org.elasticsearch.rest.RestHandler
public class RestRankEvalAction
extends org.elasticsearch.rest.BaseRestHandler
{
"requests": [{
"id": "amsterdam_query",
"request": {
"query": {
"match": {
"text": "amsterdam"
}
}
},
"ratings": [{
"_index": "foo",
"_id": "doc1",
"rating": 0
},
{
"_index": "foo",
"_id": "doc2",
"rating": 1
},
{
"_index": "foo",
"_id": "doc3",
"rating": 1
}
]
},
{
"id": "berlin_query",
"request": {
"query": {
"match": {
"text": "berlin"
}
},
"size": 10
},
"ratings": [{
"_index": "foo",
"_id": "doc1",
"rating": 1
}]
}
],
"metric": {
"precision": {
"ignore_unlabeled": true
}
}
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.rest.BaseRestHandler
org.elasticsearch.rest.BaseRestHandler.RestChannelConsumer, org.elasticsearch.rest.BaseRestHandler.WrapperNested classes/interfaces inherited from interface org.elasticsearch.rest.RestHandler
org.elasticsearch.rest.RestHandler.Route -
Field Summary
FieldsFields inherited from class org.elasticsearch.rest.BaseRestHandler
DEFAULT_INCLUDE_TYPE_NAME_POLICY, INCLUDE_TYPE_NAME_PARAMETER, logger, MULTI_ALLOW_EXPLICIT_INDEX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()protected org.elasticsearch.rest.BaseRestHandler.RestChannelConsumerprepareRequest(org.elasticsearch.rest.RestRequest request, org.elasticsearch.client.node.NodeClient client)List<org.elasticsearch.rest.RestHandler.Route>routes()Methods inherited from class org.elasticsearch.rest.BaseRestHandler
getUsageCount, handleRequest, responseParams, unrecognizedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.rest.RestHandler
allowsUnsafeBuffers, allowSystemIndexAccessByDefault, canTripCircuitBreaker, supportsContentStream
-
Field Details
-
ENDPOINT
-
-
Constructor Details
-
RestRankEvalAction
public RestRankEvalAction()
-
-
Method Details
-
routes
- Specified by:
routesin interfaceorg.elasticsearch.rest.RestHandler- Specified by:
routesin classorg.elasticsearch.rest.BaseRestHandler
-
prepareRequest
protected org.elasticsearch.rest.BaseRestHandler.RestChannelConsumer prepareRequest(org.elasticsearch.rest.RestRequest request, org.elasticsearch.client.node.NodeClient client) throws IOException- Specified by:
prepareRequestin classorg.elasticsearch.rest.BaseRestHandler- Throws:
IOException
-
getName
- Specified by:
getNamein classorg.elasticsearch.rest.BaseRestHandler
-