How can I create a wildcard query with Elasticsearch? I tried below method but I think its not working(I mean it doesn't filter).
BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
boolQueryBuilder.must(QueryBuilders.wildcardQuery("message", "ANG*"));
I also tried prefixQuery method but Its also didnt filter any result.
boolQueryBuilder.must(QueryBuilders.prefixQuery("message", "ANG"));
EDIT:
"_index": "log4j_2017",
"_type": "log4j",
"_id": "fd23123122",
"_score": null,
"_source": {
"date": "2017-03-10T19:04:50.049Z",
"contextStack": [],
"level": "INFO",
"marker": null,
"thrown": null,
"message": "ANGServlet 'spring': initialization completed in 2314 ms",
"millis": 1489151090049,
"contextMap": {},
"threadName": "http-apr-8080-exec-77"
}
curl -XGET localhost:9200/your_index?