Oh maybe a schema bug! my string_ci: <fieldType name="string_ci" class="solr.TextField" sortMissingLast="true" omitNorms="true"> <analyzer> <tokenizer class="solr.KeywordTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory" /> </analyzer> </fieldType>
going to try this instead: <fieldType name="string_lctoken" class="solr.StrField" sortMissingLast="true" omitNorms="true"> <analyzer> <tokenizer class="solr.KeywordTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory" /> </analyzer> </fieldType> Then I can probably kill the lowercasefilter on edgeytext: On Tue, Mar 24, 2020 at 7:44 AM Erick Erickson <erickerick...@gmail.com> wrote: > > Sort by the full field. You’ll need to copy to a field with keywordTokenizer > and lowercaseFilter (string_ci? assuming it’s not really a :”string”) type. > > Best, > Erick > > > On Mar 24, 2020, at 7:10 AM, matthew sporleder <msporle...@gmail.com> wrote: > > > > I have added an edge ngram field to my index and get decent results > > with partial words but the results appear randomly sorted and all > > contain the same score. Ideally I would like to sort by shortest > > ngram match within my other qualifiers. > > > > Is there a canonical solution to this? > > > > Thanks, > > Matt > > > > p.s. I mostly followed > > https://lucidworks.com/post/auto-suggest-from-popular-queries-using-edgengrams/ > > > > schema bits: > > > > <fieldType name="edgytext" class="solr.TextField" > > positionIncrementGap="100"> > > <analyzer type="index"> > > <tokenizer class="solr.KeywordTokenizerFactory"/> > > <filter class="solr.LowerCaseFilterFactory"/> > > <filter class="solr.EdgeNGramFilterFactory" minGramSize="1" > > maxGramSize="25" /> > > </analyzer> > > > > <field name="slug" type="string_ci" indexed="true" stored="true" > > multiValued="false" /> > > > > <field name="fayt" type="edgytext" indexed="true" stored="false" > > omitNorms="false" omitTermFreqAndPositions="true" multiValued="true" > > /> > > > > > > <copyField source="slug" dest="fayt" maxChars="65" /> >