I want to do a match query, and the query works fine in REST:
curl -XGET 'localhost:9200/search/video_search/_search?pretty' -d @query.
json
query.json:
{
"query": {
"match": {
"tvName": {
"query": "决战华岩寺",
"operator": "or",
"minimum_should_match": "2"
}
}
}
}
but I don't know how to do it in Java, my code below doesn't work:
MatchQueryBuilder queryBuilder = QueryBuilders.matchQuery("tvName", keyword)
.minimumShouldMatch("2")
.operator(MatchQueryBuilder.Operator.OR);
the exception is : Unexpected end of block of data.
Cloud anybody help? Thanks very much.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/86a21181-8007-4595-abc9-4b45f81b67a3%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.