Skip to content

Add fluency convenience methods for control of query item placement #113

@jclausen

Description

@jclausen

Currently many of the query items are assumed to be at the root level and do not support placement nestings ( e.g. query.bool.must[].term or query.bool.must[].bool.should[]

Add methods for fluency ( or possibly separate objects ) which can allow for more precise placement of query operators, without resorting to code like the following:

            var q = search.getQuery();
            param q.bool = {};
            param q.bool.filter = {};
            param q.bool.filter.bool.must = [];
            arrayAppend( q.bool.filter.bool.must, {
                "wildcard" : {
                    "#arguments.field#" : {
                        "value" : arguments.query
                    }
                }
            } );

Metadata

Metadata

Assignees

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