Index Field with IntField and RangeQuery with LongRange

2013-08-23 Thread Sanket Paranjape
I created a index with IntField but while querying I create a NumericRangeQuery.newLongRange(...) (by mistake ofcourse). I was not getting any products and I had a hard time finding the issue. Should this be thrown as a exception so that user knows what the issue is. Something like type mismat

RE: Index Field with IntField and RangeQuery with LongRange

2013-08-23 Thread Uwe Schindler
Hi Sanket, this was already mentioned several times: In fact, Lucene does not have a schema, so it does not know the field type of indexed fields from the IndexReader (that’s different for stored fields). So we cannot throw an exception, because the index format has no information about the dat