Hi,
I've a requirement that talks about implementing a wildcard filter with
operators like "<", "<=",">",">=","=","!=".
Ex: a<b* or a>=del*
I figured out that for
#1 "=", i could create a wilcard query and wrap it in a
QueryFilterBuilder and append it to other OrFilters or And Filters
*
*
#2 "!=", i could create a wildcard query, wrap it in a
QueryFilterBuilder, and then wrap the QueryFilterBuilder in a
NotFilterBuilder and then append the NotFilterBuilder to other OrFilters or
And Filters.
If anyone of you have worked on such a requirement, could you pls suggest a
solution.
In my application, the input is in the form (a<2&b>=7*)|c=test. I create
one single filter for the query and attach it to the match_all query.
Below is one such example
{
"from": 0,
"size": 10,
"query": {
"bool": {
"must": {
"filtered": {
"query": {"match_all": {}},
"filter": {"term": {"X.id": "*"}}
}
}
}
},
"fields": ["X.id",],"sort": [{"X.id": {"order": "asc"}}]
}
Thanks,
John
--
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.
For more options, visit https://groups.google.com/groups/opt_out.