ES 2.2 How view logs for search queries?

  • Thread starter Thread starter Deleted member 225812
  • Start date Start date
D

Deleted member 225812

Guest
Hello,

How view logs for search queries for Enhanced Search?
Thanks.
 
What is "DSL" queries?
Elasticsearch provides a full Query DSL (Domain Specific Language) based on JSON to define queries. Think of the Query DSL as an AST (Abstract Syntax Tree) of queries, consisting of two types of clauses
Sauce: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html

This is log for search queries?
Logged DSL queries would look something like this:
JSON:
{"sort":["_score",{"date":"desc"}],"docvalue_fields":["discussion_id","user","date"],"_source":false,"size":200,"query":{"function_score":{"query":{"simple_query_string":{"query":"keyword goes here","fields":["title^4.4"],"default_operator":"and"}},"functions":[{"exp":{"date":{"origin":1615704988,"decay":0.5,"scale":31536000}}}]}}}
which if you further beautify would look like
JSON:
{
  "sort": [
    "_score",
    {
      "date": "desc"
    }
  ],
  "docvalue_fields": [
    "discussion_id",
    "user",
    "date"
  ],
  "_source": false,
  "size": 200,
  "query": {
    "function_score": {
      "query": {
        "simple_query_string": {
          "query": "keyword goes here",
          "fields": [
            "title^4.4"
          ],
          "default_operator": "and"
        }
      },
      "functions": [
        {
          "exp": {
            "date": {
              "origin": 1615704988,
              "decay": 0.5,
              "scale": 31536000
            }
          }
        }
      ]
    }
  }
}
 
Back
Top Bottom