Closed voldyman closed 3 years ago
@voldyman this looks good to me. One question, is there a reason not all queries are updated here? I see only the GeoBoundingPolygonQuery and not BoudingBox or PointDistance. I didn't exhaustively look for all of them, just noticed those two missing...
There is not reason to skip them, I just missed them i think.
Let me push another commit with accessors for them.
Background
When i use the query_string package, i get a query tree but it's opaque and can't be modified. I want to use custom analyzers, boosts, parameters for fields queries.
I've implemented a
QueryVisitor
in my code, which let's me traverse the query tree and modify it as needed but the problem is that once a Query is generated, it's parameters are not visible.Solution
With this change, I can read the properties of the sub-queries and transform them according to my logic.
Note: This commit only updates one existing method
SetMinShould
to return*BooleanQuery
to be consistent with other methods and convenience.Note2: My visit interface looks like the following