We are currently using lucene 2.3.2. We pad integers with leading zeroes and index so that we can support range queries as well. We are working towards upgrading to lucene 3.4 and want to use NumericRangeQueries. We also want to support non-range queries on numeric fields. Is there any way to use number field and support in-list kind of queries on numeric fields in lucene.
request_id:(123, 124, 253)
I know that above query can be translated to
request_id:[123 TO 123] OR request_id:[124 TO 124] OR request_id:[253 TO 253]
But query will be too long when user gives a huge list. Is there any way to get the best of both approaches? (performance benefits on range queries from indexing as numeric fields and supporting in-list queries without translating these to pseudo range queries)