But I'm a bit confused now, since the Luke tool is capable of transforming id:(1 OR 2 OR 3) to the search term "id:1 id:2 id:3".
Robin Schimpf Luke doesn't know which analyzer to use for a given field, and if I remember correctly it uses the StandardAnalyzer by default. Even for the ID.
Also I was trying to avoid to build every single boolean query by myself with this approach.
I guess you're out of luck with the QueryBuilder then: the idea is to make it easier for users to build queries without concatenating strings (which is likely to result in query injection vulnerabilities) or building Lucene Query objects yourself (which is even more verbose). It also adds some type safety. But I'm sure you can create a small utility method to automate what you want to do. |