Fix RegexpQueryBuilder to support an Object value#12076
Fix RegexpQueryBuilder to support an Object value#12076alexksikes wants to merge 1 commit intoelastic:masterfrom
Conversation
The parser takes an Object value, so should the builder. Relates to elastic#11896
|
the change LGTM but let's wait a sec to see whether this is the way forward or not. See here |
|
I discussed this PR and #12124 with @jpountz . Seems like it makes little sense (probably none) to support objects here, as only fields that are actually strings work against the regex/prefix query. It initially seemed like if the only java api was missing support for objects it should have been updated, but we are now wondering whether it would make sense to do the other way around and go back to Strings in parsers and mappers around regexp and prefix. @clintongormley do you have an opinion on this? @kimchy do you have some more history on why we moved to objects in this change back in 2012 22077d1 :) ? @alexksikes sorry for conflicting opinions here let's see if we can sort this out now :) |
|
After some discussion I think my initial idea of moving the java api builder over to supporting a string was wrong. We should rather do the other way around and move the parser etc. back to String, given that supporting objects makes very little sense. Same for #12124. Sorry @alexksikes :) |
|
I do have to agree to this as well. Accepting an Object means anything could go in, but not everything has a valid string representation. |
The parser takes an Object value, so should the builder.
Relates to #11896