I’m trying to run a specific search in ElasticSearch using the Java API. It works well, but I need to use a snowball analyser.
What I really want is to implement this kind of search:
http://localhost:9200/myindex/myfeed/_search?q=myterm:myvalue&analyzer=myanalyzer
using Java API.
I’m using a TransportClient with many different types of queries (filtered, match all, text). I’m running multiple search queries in bulk.
I don’t see anything relevant to analysers in the SearchRequestBuilder. Am I looking in the wrong place?
Your request would translate into
In general, when you are running into problems translating Rest API requests into JavaAPI requests, take a look at the Rest???Action class, where ??? is the name of your request. For example, if you would like to learn more about building Search requests, take a look at RestSearchAction.java. You can also find many java API examples in the elasticsearch integration tests.