-
Notifications
You must be signed in to change notification settings - Fork 6
Permit choose between must and filter #6
Comments
Hey @sevdog, I was under the impression that this package isn't really being used by anyone so I haven't really been maintaining it much. However, I am happy to discuss improvements. Do you have any suggestions for how the filter query would be specified? |
Its fun, I was looking for a library that may allow me (and my users) writing more easily queries for Elasticsearch, without using Lucene syntax. This because in many cases we do not need Elasticsearch to calculate result score (which is done with Lucene Query String ) Then I found this library and got a try. It is really more simple to write a query with it. However it uses Based on what I have found in the code, there are two points where main changes are needed: IMO when calling If I can find some free-time I may try to produce a PR for this, but I never worked with PEGjs and I must learn if my changes may also impact how it works. |
@sevdog A PR would be very welcome 😄. The changes would need to be done in the PEG.js definition file which is used to generate the Right now, For the most part, you would only need to tweak the JS embedded in PEG.js definition file(see example). If you wish to override any of the implementation present in |
As of now all queries are converted into
must
.However someone could want to use
filter
queries (to not spend time calculating scrores).There should be an option or a parameter to choose between
must
andfilter
when calling the parser.The text was updated successfully, but these errors were encountered: