MultiMatchQuery for simple phrase search

Hi, i need some help.

i'm simply trying to retrieve documents with the word "Cheese" in some of its fields.

Below is a sample document.

{"caption":"Cheese, An authentic Creole Jambalaya recipe!",
 "description":"Jambalaya, delicious one-pot meal Cheese coming to you from New Orleans", 
"productid":"75","productname":"Cheese Jambalaya"}

The MultiMatchQuery query used doesn't return any hits.

Below is the sample code used.

MultiMatchQueryBuilder multiMatchQueryBuilder = new MultiMatchQueryBuilder("Cheese", "caption","productname","description");
        SearchRequest searchRequest = new SearchRequest(index);
        SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder()
        restHighLevelClient.searchAsync(searchRequest, RequestOptions.DEFAULT, actionListener);

Pls, what is wrong and what's the right way to accomplish this?

thanks alot.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.