Thanks Otis.

Here is my alphaOnlySort. This is exactly the same as default except pattern
replace filter

    <!-- This is an example of using the KeywordTokenizer along
         With various TokenFilterFactories to produce a sortable field
         that does not include some properties of the source text
      -->
    <fieldType name="alphaOnlySort" class="solr.TextField"
sortMissingLast="true" omitNorms="true">
      <analyzer>

        <!-- KeywordTokenizer does no actual tokenizing, so the entire
             input string is preserved as a single token
          -->
        <tokenizer class="solr.KeywordTokenizerFactory"/>
        <!-- The LowerCase TokenFilter does what you expect, which can be
             when you want your sorting to be case insensitive
          -->
        <filter class="solr.LowerCaseFilterFactory" />
        <!-- The TrimFilter removes any leading or trailing whitespace -->
        <filter class="solr.TrimFilterFactory" />
        <!-- The PatternReplaceFilter gives you the flexibility to use
             Java Regular expression to replace any sequence of characters
             matching a pattern with an arbitrary replacement string, 
             which may include back refrences to portions of the orriginal
             string matched by the pattern.
             
             See the Java Regular Expression documentation for more
             infomation on pattern and replacement string syntax.
             
            
http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/package-summary.html
                        <filter class="solr.PatternReplaceFilterFactory"
                                        pattern="([^a-z])" replacement="" 
replace="all"
                        />
          -->
      </analyzer>
    </fieldType>


What's the easiest way to re-index without cleaning and rebuilding the index
from scratch?

Thanks!



Otis Gospodnetic wrote:
> 
> Hi,
> 
> How was alphaOnlySort defined before you indexed it?  It must be
> untokenized and this must be set before indexing.
> 
> Otis
> --
> Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
> 
> 
> ----- Original Message ----
>> From: pmg <[EMAIL PROTECTED]>
>> To: solr-user@lucene.apache.org
>> Sent: Thursday, May 22, 2008 10:19:52 PM
>> Subject: Re: solr sorting problem
>> 
>> 
>> I forgot to mention that I made changes to schema after indexing. 
>> 
>> 
>> pmg wrote:
>> > 
>> > I have problem sorting solr results. Here is my solr config 
>> > 
>> >    
>> >    
>> >    
>> > stored="true"/>
>> > 
>> > 
>> >    
>> >    
>> >      
>> > 
>> > 
>> > search query 
>> > 
>> > 
>> select/?&rows=100&start=0&q=artistId:100346%20AND%20type:track&sort=alphaTrackSort%20desc&fl=track
>> > 
>> > does not sort track.
>> > 
>> > Don't understand what is missing from config
>> > 
>> 
>> -- 
>> View this message in context: 
>> http://www.nabble.com/solr-sorting-problem-tp17417394p17417408.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/solr-sorting-problem-tp17417394p17430118.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to