Give us some pairs of titles which sort the wrong way. On Thu, Aug 2, 2012 at 10:06 AM, Anupam Bhattacharya <anupam...@gmail.com> wrote: > The approach used to work perfectly. > > But recently i realized that it is not working for more than 300000 indexed > records. > I am using SOLR 3.5 version. > > Is there another approach to SORT a title field in proper alphabetical > order irrespective of Lower case and Upper case. > > Regards > Anupam > > On Thu, May 17, 2012 at 4:32 PM, Ahmet Arslan <iori...@yahoo.com> wrote: > >> > The title sort works in a strange manner because the SOLR >> > server treats >> > title string based on Upper Case or Lower Case String. Thus >> > if we sort in >> > ascending order, first the title with numeric shows up then >> > the titles in >> > alphabetical order which starts with Upper Case & after >> > that the titles >> > starting with Lowercase. >> > >> > The title field is indexed as text_general fieldtype. >> > >> > <field name="title" type="text_general" indexed="true" >> > stored="true"/> >> >> Please see Otis' response http://search-lucene.com/m/uDxTF1scW0d2 >> >> Simply create an additional field named title_sortable with the following >> type >> >> <!-- 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" /> >> <filter class="solr.TrimFilterFactory" /> >> </analyzer> >> </fieldType> >> >> Populate it via copyField directive : >> >> <copyField source="title" dest="title_sortable" maxChars="N"/> >> >> then &sort=title_sortable asc >> >> >>
-- Lance Norskog goks...@gmail.com