Skip Menu |

This queue is for tickets about the KinoSearch CPAN distribution.

Report information
The Basics
Id: 63192
Status: open
Priority: 0/
Queue: KinoSearch

People
Owner: Nobody in particular
Requestors: jmac [...] jmac.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.31
Fixed in: (no value)



Subject: RangeQuery shouldn't let you use non-sortable fields
The KinoSearch::Search::RangeQuery constructor should throw an exception if you hand it a field that isn't sortable. Currently, it allows you build a query object with a non-sortable field. However (unless my observations are incorrect) it then proceeds to always return zero hits, no matter the supplied terms. Dying on construction would be preferable to failing silently.
Hello Jason, RangeQuery's constructor doesn't take a Schema, so it doesn't know anything about your index and its field definitions. Therefore, it can't know at construction-time whether or not the field that you supply to it is sortable. Any given RangeQuery object can actually be reused with different indexes and different Schemas! There may be other ways to address your wish, such as dying when the query is executed by a Searcher. However, the topic is somewhat controversial, as some users believe that KinoSearch dies too often and too easily -- so such a proposal would require discussion. I encourage you to subscribe to the Apache Lucy developers list (which is where KinoSearch development gets discussed these days, see <http://incubator.apache.org/lucy/>) and bring up the topic there, referencing this rt.cpan.org URL if you wish. Best, Marvin Humphrey