Skip to content

ElasticSearch always true option. #18970

@Jack-Collins

Description

@Jack-Collins

Due to a major shortcoming with the mustache templating language I have found that it very difficult to query based on an array passed as a parameter as there is a known issue with a trailing comma.

To cut a long story short, a more elegant solution that awkwardly manipulating the input data would be possible if an always true option existed within elastic

{
"bool" : {
         "must" : [
             {
                 "term" : "myInputtedTerm1" 
             },
             {
                  "term" : "myInputtedTerm2"
             },            
                 alwaysTrue         
        ]
    }
}

Digging around I can't see anything like this that exists so I do believe it is worth implementing. Or if somebody has a workaround, please let me know.

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Search/SearchSearch-related issues that do not fall into other categoriesdiscuss

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions