Probably it will combine several questions, but the context is the same.
Background: I need to implement custom query parsing for Lucene. The reason is that i dont store some fields in Lucene, but just keep them in a separate db, because they are changing too often. This field is classification category, i.e. cat
So, I want to parse the query like this:
(cat:important and hello) or (cat:not_important and hi)
Are there any standard ANTLR4 query parsers (or examples) for Lucene like language? Is there a way to introduce custom QueryNode without need for me to rewrite everything (Sytax, QueryBuilders, and etc.) from scratch?
Thanks a lot folks!!!
I would even:
modify the original StandardQueryParser.jj file, generating another QueryParser
with the help of JavaCC (which generates LL descent parsers just like AntLR),
translate the original StandardQueryParser.jj file to the correct AntLR grammar syntax, or
check if ExtendableQueryParser
isn't enough for that kind of fields.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With