In general, sorting doesn't work well for multivalued and tokenized fields. You need to copy your tokenized url to a "utl_str" string field and then sort that field.

-- Jack Krupansky

-----Original Message----- From: Furkan KAMACI
Sent: Wednesday, July 17, 2013 5:54 AM
To: solr-user@lucene.apache.org
Subject: Why "Sort" Doesn't Work?

I run a query at my Solr 4.2.1 SolrCloud:

/solr/select?q=*:*&rows=300&wt=csv&fl=url&sort=url asc

result is as follows:

http://goethetc.blogspot.com/
http://about.deviantart.com/contact/
http://browse.deviantart.com/designbattle/
http://browse.deviantart.com/digitalart/
http://hayathepbahar.blogspot.com/
http://corporateoutfitter.cabelas.com/
http://german.alibaba.com/
...

url if defined as follows at my schema:

<fieldType name="url" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1"
generateNumberParts="1"/>
</analyzer>
</fieldType>
...
<field name="url" type="url" stored="true" indexed="true" required="true"/>

*Why it is not sorted?*

Reply via email to