use of org.graylog.shaded.elasticsearch7.org.elasticsearch.client.indices.AnalyzeResponse in project graylog2-server by Graylog2.
the class MessagesAdapterES7 method analyze.
@Override
public List<String> analyze(String toAnalyze, String index, String analyzer) {
final AnalyzeRequest analyzeRequest = AnalyzeRequest.withIndexAnalyzer(index, analyzer, toAnalyze);
final AnalyzeResponse result = client.execute((c, requestOptions) -> c.indices().analyze(analyzeRequest, requestOptions));
return result.getTokens().stream().map(AnalyzeResponse.AnalyzeToken::getTerm).collect(Collectors.toList());
}
Aggregations