Hello,
I've been working on a problem where modelling the search filters as ES
filters has almost become impossible.
e.g: The incoming filter is generated by an application enforcing certain
constraints on search. The filter itself is hierarchical and dynamic in
nature depending on certain parameters. Think of it as a directory
structure(ex. is completely different and over simplification, but comes
very close in terms of representation)
aFilter = {
"root": {
"usr": {
"elasticsearch": "present",
"es-index-notification": "absent"
},
"system": {
"elasticsearch": "present",
"es-index-notification": "present",
"attachment": "present"
}
}
}
The filter predicate essentially involves traversing this structure breadth
first (not a big and growing structure; space and time complexity would be
reasonably constant) and match it with information in the indexed
document(one field in particular)
Was thinking of using the ScriptFilter for the traversal. The other trouble
is performance if this filter is applied along with search(large document
set).
This is where the post_filter made sense, in order to reduce the
performance impact.
My question is two fold:
- the documentation claims post_filter is available as part of 0.90.x but
its only available for versions after 0.90.8(was able to verify with that);
am i missing something?
- I'm currently using 0.90.2(planning for an upgrade, have various other
constraints, will probably happen in near future) and tried the example on
the page
http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/search-request-post-filter.html#search-request-post-filter
Parse Failure [No
parser for element [post_filter]]]; - Looks like the post_filter parser is not available
- is there any place where i can find info on the query order pre_filter,
query, post_filter, pagination and sort etc?
Finally the problem statement in general - is there a non script way of
achieving this in elasticsearch?
Apologies for the long email, any insight on this is appreciated.
Thank you,
Pramod N
@machinelearner https://twitter.com/machinelearner
--
--
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/CAGEoYnu7SiMPJUKLC0zABy10kpuUmEZUCZV3SCgfAwUUkUOZvA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.