Hey there,
I'm writing an Elasticsearch plugin. Can someone direct me to the right place how to execute a Lucene query in the Query Builder or Rescoring part from a plugin?
The reason for a Lucene is because I want to apply ML data model in the shard for the number of documents filtered by a query. I know there are existing plugins for that but none of them really works in my business case.
Is there any way to access Lucene from custom query builder (from a plugin):
public class MyCustomQueryPlugin extends Plugin implements SearchPlugin {
@Override
public List<QuerySpec<?>> getQueries() {
return singletonList(
new QuerySpec<>(MyCustomQueryBuilder.NAME, MyCustomQueryBuilder::new, MyCustomQueryBuilder::fromXContent)
);
}
}