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 Patrick Wilson <PW...@r2integrated.com> on 2010/06/04 17:22:47 UTC

String Sort Nor Working

All,
I am trying to sort on a text field and can't get it to work. I try sorting on "sortTitle" and get no errors, it just doesn't appear to sort. The pertinent parts of my schema:

<fieldType
                name="text"
                class="solr.TextField"
                positionIncrementGap="100">
... lots of filters that do work...
</fieldType>
<fieldType
                name="sortString"
                class="solr.TextField"
                sortMissingLast="true"
                omitNorms="true">
                <analyzer>
                                <tokenizer
                                                class="solr.KeywordTokenizerFactory" />
                                <filter
                                                class="solr.LowerCaseFilterFactory" />
                                <filter
                                                class="solr.TrimFilterFactory" />
                </analyzer>
</fieldType>

<field name="title" type="text" indexed="true" stored="true" termVectors="true" />

<field name="sortTitle" type="sortString" indexed="true" stored="true" />
<copyfield source="title" dest="sortTitle" />

I set stored="true" on the sort field so I could see if anything was getting copied there, and it would appear that this is not the case. I don't see any "top 10" summaries like I do for other fiends, including another field populated by copyField. Is this just because of the filters I am using?

I'm sure this horse has or similar horses have been beaten to death before, but I'm new to this mailing list, so sorry about that. Any help is greatly appreciated!

Thanks,
Patrick

RE: String Sort Nor Working

Posted by Patrick Wilson <PW...@r2integrated.com>.
Very informative - thank you!

I think it might be useful to have this feature - maybe have an interface for plugins to register a XSD or otherwise declare its expected xml elements and attributes. I'm not sure if there's enough demand for this to justify the time it would take to make this change though. Just a thought.

-----Original Message-----
From: Ahmet Arslan [mailto:iorixxx@yahoo.com]
Sent: Friday, June 04, 2010 1:41 PM
To: solr-user@lucene.apache.org
Subject: RE: String Sort Nor Working

> P.S. Might it be helpful for Solr to complain about invalid
> XML during startup? Does it do this and I'm just not
> noticing?

Chris's explanation about a similar topic:
http://search-lucene.com/m/11JWX1hxL4u/




RE: String Sort Nor Working

Posted by Ahmet Arslan <io...@yahoo.com>.
> P.S. Might it be helpful for Solr to complain about invalid
> XML during startup? Does it do this and I'm just not
> noticing?

Chris's explanation about a similar topic:
http://search-lucene.com/m/11JWX1hxL4u/


      

RE: String Sort Nor Working

Posted by Patrick Wilson <PW...@r2integrated.com>.
That did it. Thank you =)

P.S. Might it be helpful for Solr to complain about invalid XML during startup? Does it do this and I'm just not noticing?

-----Original Message-----
From: Ahmet Arslan [mailto:iorixxx@yahoo.com]
Sent: Friday, June 04, 2010 12:18 PM
To: solr-user@lucene.apache.org
Subject: Re: String Sort Nor Working

> <copyfield source="title" dest="sortTitle" />
>

Simple lowercase F is causing this. It should be <copyField




Re: String Sort Nor Working

Posted by Ahmet Arslan <io...@yahoo.com>.
> <copyfield source="title" dest="sortTitle" />
> 

Simple lowercase F is causing this. It should be <copyField