Elasticsearch global search different filter on multiple indexes

We have got multiple indexes in elasticsearch and would like to search the
data across all indexes but we want to apply different filters on different
indexes. e.g.

  • few indexes depends on client Id, hence client Id filter is required
  • we have IS_DELETED flag in few indexes, hence IS_DELETED filter is
    required

What is the way to approach this in elasticsearch.

Also, we are using highlight feature of elasticsearch, which is supposed to
give suggestions to the users but would like to ignore certain fields in
the highlighted results. Is it possible to exclude certain fields at global
level.

--
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/7db38b10-f3db-457b-868a-ff02790ad8f0%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

It is possible to define multiple aliases (each with a different filter
condition) and then search across aliases. Might help in your case.

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-aliases.html

About highlighting, if you mean can you selectively highlight on specific
fields, yes you can supply a list of fields that ES will perform the
highlighting on. More details here:

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-highlighting.html

--
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/230605ee-e178-4c24-9380-3976f73b095d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks for the prompt response. Aliases will surely help me in resolving
filter issue across indexes but I didn't get how would I exclude certain
fields globally from highlightling. Our requirement is to highlight all the
fields except few fields.

On Thursday, 13 February 2014 19:49:10 UTC+5:30, Binh Ly wrote:

It is possible to define multiple aliases (each with a different filter
condition) and then search across aliases. Might help in your case.

Elasticsearch Platform — Find real-time answers at scale | Elastic

About highlighting, if you mean can you selectively highlight on specific
fields, yes you can supply a list of fields that ES will perform the
highlighting on. More details here:

Elasticsearch Platform — Find real-time answers at scale | Elastic

--
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/a4f9db18-c12d-42cc-90ca-1bd1e0631e6c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

I see, I didn't understand your original question. Unfortunately, you
cannot say something like highlight all fields except field A, B, C. You
can only list the fields you want highlighting on, and in addition you can
use wildcards when specifying field names like for example:

{
"_source": false,
"highlight": {
"fields": {
"ti*": {
"number_of_fragments": 0
}
}
}
}

--
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/dc8a55b1-fbd4-431b-a808-c1bb6e2110a1%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.