You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Lance Norskog <go...@gmail.com> on 2007/10/14 02:37:06 UTC

Non-sortable types in sample schema

The sample schema in Solr 1.2 supplies two variants of integers, longs,
floats, doubles. One variant is sortable and one is not.
 
What is the point of having both? Why would I choose the non-sorting
variants? Do they store fewer bytes per record?
 
Thanks,
 
Lance Norskog

Re: Non-sortable types in sample schema

Posted by Yonik Seeley <yo...@apache.org>.
On 10/13/07, Lance Norskog <go...@gmail.com> wrote:
> The sample schema in Solr 1.2 supplies two variants of integers, longs,
> floats, doubles. One variant is sortable and one is not.
>
> What is the point of having both? Why would I choose the non-sorting
> variants? Do they store fewer bytes per record?

They both "sort" (because sorting uses the un-inverted FieldCache
entry) ... but they don't both do range queries correctly (which
relies on term index oder).

One might choose "integer" for reading a legacy lucene index, or
because they only need it for sorting or for function queries and the
FieldCache entry is smaller.

-Yonik