How do I do a custom score query through the java client api?
I want to do what is described here, except do it through the java api:
Is this possible, or do I have to use the REST api to get this functionality?
I assume it is not the method sort(java.lang.String s) on org.elasticsearch.search.builder.SearchSourceBuilder, as that method has been there at least since 0.8, and my understanding is that custom score queries are new in 0.9.
In your java code, you wrap the query that you execute with a
customScoreQuery (from the static factory QueryBuilders). In general,
everything that you have in the REST API is exposed in the Java API.
I assume it is not the method sort(java.lang.String s) on
org.elasticsearch.search.builder.SearchSourceBuilder, as that method has
been there at least since 0.8, and my understanding is that custom score
queries are new in 0.9.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.