vespa-engine / vespa

AI + Data, online. https://vespa.ai
https://vespa.ai
Apache License 2.0
5.75k stars 600 forks source link

Add onear grammar value to userInput() #7294

Open dkurzaj opened 6 years ago

dkurzaj commented 6 years ago

We could add the onear value to the possible parsing grammars of userInput().

This would allow to parse the user input as a query such that the terms are combined by the onear() operator.

rharige commented 3 years ago

Hello, I am looking into this issue and have a question: to support "onear" annotation, I think we need to extend the definition of UserInput such that it also accepts the "distance" param, in addition to the "grammar" param. My first guess is this change has to happen in ANTLR grammar for UserInput definition. However, I am not finding the definition of UserInput in any of the grammar files. am I missing something here? if the DSL grammar definition of UserInput is not in ANTLR, is it parsed in code?