While working in this change a couple of question arose:
-
How do we deal with document ids? Often the id (especially in the JPA case) will be a number (int or long). Should we also index the id per default as numeric field. That would be consistent, but I wonder whether the document id should be treated different to for example allow a TermQuery to search for a specific document. The question came up by the fact that several tests use term queries to assert/test the existence of a document. Also I am not sure how important things like range searches and sorting is on the document id!?
-
Switching to numeric fields by default will potentially break queries. For example exsiting TermQueries will not work and need to be replaced with NumericRangeQuery.newXYZRange. The issue is that this failure will be "silent", meaning there won't be an exception when trying to execute a term query against a numeric field. Not sure if and to which extend we can mitigate this.
-
Similar to term queries, range queries with the query parser of the form 'double:[2.1 TO 3.1]' won't work anymore
Thoughts?
|