-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
| Q | A |
|---|---|
| Bug report? | no |
| Feature request? | yes |
| BC Break report? | no |
| RFC? | no |
Currently, the final query generated for Elasticsearch is directly derived from the search condition. This can lead to verbose queries, for example for search condition name: foo you get:
{
"query": {
"bool": {
"must": [
{
"terms": {
"name": [
"foo"
]
}
}
]
}
}
}Can be at least reduced to:
{
"query": {
"terms": {
"name": [
"foo"
]
}
}
}We can also detect if we have exact or fuzzy matches and use filtered query (more examples of possible optimizations are linked).