On Thu, Nov 28, 2013 at 2:19 AM, Thomas den Braber <[email protected]> wrote:
> When I do a range query on a sortable Int32Type I get an error: "term is a
> Lucy::Object::CharBuf, and not comparable to a Lucy::Object::Integer32"
>
> I use the range in the same way as in the example:
> http://search.cpan.org/~creamyg/Lucy-0.3.3/lib/Lucy/Search/RangeQuery.pod
Ah. You might be able to work around that by supplying values like so:
my $range_query = Lucy::Search::RangeQuery->new(
field => 'product_number',
lower_term => Lucy::Object::Integer32->new(value => 3),
);
> Do you know if there is a speed difference between sorting on Int32Type
> fields and text fields with leading zero's ?
Should be negligible.
(Gory details: We pre-sort everything at index-time and write out binary
integer ordinals. Most comparisons happen between the ordinals and are very
fast. Some text comparisons happen but these scale with the number of
segments in the index, not the number of documents matched by the query.)
Marvin Humphrey