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 Jamie Johnson <je...@gmail.com> on 2011/06/08 18:44:25 UTC

Sorting on solr.TextField

Is there any documentation which details sorting behaviors on the different
types of solr fields?  My question is specifically about solr.TextField but
I'd just like to know in general at this point.  Currently when executing a
query and I say to sort on a text field I am getting results as follows:


Beth Cross
Beth Cross
Caroline Cross
Arlene Cross
Calvin Cross
Brett Cross
Brandon Cross
Beth Cross
Beth Cross
Caroline Cross

where I would have expected

Arlene Cross
Beth Cross
Beth Cross
Brett Cross
Beth Cross
Beth Cross
Brandon Cross
Calvin Cross
Caroline Cross
Caroline Cross

Re: Sorting on solr.TextField

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Wed, Jun 8, 2011 at 1:21 PM, Jamie Johnson <je...@gmail.com> wrote:
> Thanks exactly what I was looking for.
>
> With this new field used just for sorting is there a way to have it be case
> insensitive?

>From the example schema:

    <!-- lowercases the entire field value, keeping it as a single token.  -->
    <fieldType name="lowercase" class="solr.TextField"
positionIncrementGap="100">
      <analyzer>
        <tokenizer class="solr.KeywordTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory" />
      </analyzer>
    </fieldType>


-Yonik
http://www.lucidimagination.com

Re: Sorting on solr.TextField

Posted by Jamie Johnson <je...@gmail.com>.
Thanks exactly what I was looking for.

With this new field used just for sorting is there a way to have it be case
insensitive?

On Wed, Jun 8, 2011 at 12:50 PM, Ahmet Arslan <io...@yahoo.com> wrote:

> > Is there any documentation which
> > details sorting behaviors on the different
> > types of solr fields?  My question is specifically
> > about solr.TextField but
> > I'd just like to know in general at this point.
>
>
> http://wiki.apache.org/solr/FAQ#Why_Isn.27t_Sorting_Working_on_my_Text_Fields.3F
>

Re: Sorting on solr.TextField

Posted by Ahmet Arslan <io...@yahoo.com>.
> Is there any documentation which
> details sorting behaviors on the different
> types of solr fields?  My question is specifically
> about solr.TextField but
> I'd just like to know in general at this point. 

http://wiki.apache.org/solr/FAQ#Why_Isn.27t_Sorting_Working_on_my_Text_Fields.3F