Skip to content

Not able to cache fqueries in a bool filter using Nest 1.0 #928

@bittusarkar

Description

@bittusarkar

I have a requirement of caching fqueries inside a bool should/must filter. Example: I want to produce the following ES query string using Nest. I've used term and wildcard queries simply as placeholders here. They can be any generic queries.

"filter": {
    "bool": {
         "must": [
            {
               "fquery": {
                  "query": {
                     "term": {
                        "field1": {
                           "value": "value1"
                        }
                     }
                  },
                  "_cache": true
               }
            },
            {
               "fquery": {
                  "query": {
                     "wildcard": {
                        "field2": {
                           "value": "value2"
                        }
                     }
                  },
                  "_cache": true
               }
            }
         ]
      }
   }

I could not find any Nest documentation around this and in Nest code I only found how to cache the entire bool query but not individual fqueries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions