org.elasticsearch.action.termvectors.MultiTermVectorsRequest Java Examples

The following examples show how to use org.elasticsearch.action.termvectors.MultiTermVectorsRequest. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MoreLikeThisFetchService.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
public MultiTermVectorsResponse fetchResponse(List<Item> items,
                                              SearchContext searchContext) throws IOException {
    MultiTermVectorsRequest request = new MultiTermVectorsRequest();
    for (Item item : items) {
        request.add(item.toTermVectorsRequest());
    }
    request.copyContextAndHeadersFrom(searchContext);
    return client.multiTermVectors(request).actionGet();
}
 
Example #2
Source File: RestMultiTermVectorsAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) throws Exception {
    MultiTermVectorsRequest multiTermVectorsRequest = new MultiTermVectorsRequest();
    TermVectorsRequest template = new TermVectorsRequest();
    template.index(request.param("index"));
    template.type(request.param("type"));
    RestTermVectorsAction.readURIParameters(template, request);
    multiTermVectorsRequest.ids(Strings.commaDelimitedListToStringArray(request.param("ids")));
    multiTermVectorsRequest.add(template, RestActions.getRestContent(request));

    client.multiTermVectors(multiTermVectorsRequest, new RestToXContentListener<MultiTermVectorsResponse>(channel));
}
 
Example #3
Source File: ClientWithStats.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public ActionFuture<MultiTermVectorsResponse> multiTermVectors(MultiTermVectorsRequest request) {
	return wrapped.multiTermVectors(request);
}
 
Example #4
Source File: ClientWithStats.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public void multiTermVectors(MultiTermVectorsRequest request, ActionListener<MultiTermVectorsResponse> listener) {
	wrapped.multiTermVectors(request, listener);
}
 
Example #5
Source File: FessEsClient.java    From fess with Apache License 2.0 4 votes vote down vote up
@Override
public ActionFuture<MultiTermVectorsResponse> multiTermVectors(final MultiTermVectorsRequest request) {
    return client.multiTermVectors(request);
}
 
Example #6
Source File: FessEsClient.java    From fess with Apache License 2.0 4 votes vote down vote up
@Override
public void multiTermVectors(final MultiTermVectorsRequest request, final ActionListener<MultiTermVectorsResponse> listener) {
    client.multiTermVectors(request, listener);
}