We are considering using Elastic search in our web application as a replacement for SOLR. I was hoping to get some guidance/advice on the best approach for one aspect of how we use search in our product.
A user's access to search results can be narrowed by 'object filters', which can give access to, say, 'All objects that start with 'A*β. In Elasticsearch, a 'filter' clause can be used to achieve these results (example at bottom.)
What we need help with is deciding if that approach will be the best way to implement this with Elasticsearch. There could potentially be dozens of filters that will apply - each with multiple fields to evaluate - would we run into size limits on the query string with this approach? Any other potential issues doing it this way?
The other option is to not use the filter clause, and use a plugin of our own to filter the results before showing the viewer.
thanks for any help,
Tom
β¦ TMI/E.G:
This is example of the type of query we would use. The user enters a β*β string to return all objects, and filter query would return only those that start with T or C:
GET objects/_search
{
"query": { ## Userβs actual query entered in search form,
## Objects whose name matches β*β
"bool": {
"must": [
{"query": {"wildcard": {"name": "*"}}}
],
"filter": { ## Filter query constructed from object filters
"query": {
"bool": {
"should": [
{
"bool": {
"must": [
{"wildcard": {"name": "T*"}}
]
}
},
{
"bool": {
"must": [
{"wildcard": {"name": "C*"}}
]
}
....