Affects Version/s: 6.0.0.Alpha2
Fix Version/s: 6.0.0.Alpha3
For example, the current syntax looks like this:
After this change, it would look like this:
- More consistent: currently, some options are specified before the field path, some after. After this change, every option comes at the end. Note it's also more consistent with the projection/sort DSL, where options always come after we specify the field path.
- Easier to read: the main information is specified first (type of predicate, fields, value to match), and the details come later
- Clearer errors: some options (for example fuzzy) are supposed to throw an exception when applied to a field that doesn't support it (an integer field, for example). With the new syntax, we would be able to throw the exception when the option is set, because we know of all the targeted fields at that point. Currently we don't, so we throw the exception later, when matching is called, which is slightly confusing.
- Yet another syntax change. But we're hardly similar to Search 5 anymore, so one more syntax change is not the end of the world...