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()
.from(0).size(resultcount).timeout(TimeValue.timeValueMillis(X_TIMEOUT_MILLIS));
searchSourceBuilder.query(multiMatchQueryBuilder);
searchRequest.source(searchSourceBuilder);
restHighLevelClient.searchAsync(searchRequest, RequestOptions.DEFAULT, actionListener);
Pls, what is wrong and what's the right way to accomplish this?
thanks alot.