Hi Gili, if you want to use sorting you will need to index the extra string field. And I suggest you to set only DocValues on that field. Doc values are not compatible with textual analysed fields and neither sort is.
[1] https://cwiki.apache.org/confluence/display/solr/Common+Query+Parameters#CommonQueryParameters-ThesortParameter Cheers On 6 October 2015 at 19:27, Gili Nachum <gilinac...@gmail.com> wrote: > Hi, wanted to make sure I'm implementing sort in an efficient way... > > I need to allow users to sort by documents' title field. A title can > contain 1-20 words. > Title examples: "new project meeting minutes - Oct 2015 - new chance on the > horizon" or "how to create a wonderful presentation". > > I'm already indexing title as a TextField, and I not comfortable with > indexing it again as an extra StrField field I'll need plus the extra > FieldCache memory. > I can probably avoid the FieldCache by using docValues to reduce mem usage. > > *But... is there a more efficient way to provide this sort? perhaps > something that takes advantage of title field is a chain of words with > whitespaces between words?* > > My index is 100's of millions of documents over 8 shards. > > Thanks. > -- -------------------------- Benedetti Alessandro Visiting card - http://about.me/alessandro_benedetti Blog - http://alexbenedetti.blogspot.co.uk "Tyger, tyger burning bright In the forests of the night, What immortal hand or eye Could frame thy fearful symmetry?" William Blake - Songs of Experience -1794 England