Kibana autocomplete inside bool

The autocomplete in DevTools is great because, as a beginner, it suggests what you might mean and what's legal at the current stage of building your query.

For example. I type "q and it suggests "query", then I type "co and I get "constant_score".

However, once I get inside the "bool", it seems to stop suggesting - making it difficult to know (as a beginner) what my feasible options are.

For example, I've built this query:

GET my_store/products/_search { "query": { "constant_score": { "filter": { "bool": { "must" : [ { "term" : { "productType" : "cooker"} }, { "range" : { "price" : { "gte" : 10, "lte" : 20 } } } ] } } } } }

So I see two possibilities here:

  1. My query is syntactically / structurally correct and Kibana could be improved.
  2. My query is syntactically / structurally incorrect and Kibana is behaving correctly.

If it's 1, I'm happy to raise an enhancement request. If it's 2, how could my query be improved?

Hi @agardnerIT,

you seem to have indeed found a bug in the autocompletion there. It would be much appreciated if you could open a new issue on GitHub.

As for improving the query, it depends on your use-case. If the constant_score query does indeed not contain a value for boost, you could leave it out and just run the bool query directly. The query seems to be syntactically correct in any case.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.