Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jclausen opened this issue Dec 30, 2022 · 0 comments
Open

Comments

@jclausen
Copy link
Contributor

jclausen commented Dec 30, 2022

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
                    }
                }
            } );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant