Indexing keyword list in alphabetical order VS not sorting at all in elasticsearch


(Fong Ng) #1

I'm using elasticsearch to store lists of keywords with the standard analyzer, like this:

{
   id:1,
   body_color:'silver,blue',
   feature:'wifi,gps'  
},
{
   id:2,
   body_color:'blue,red',
   window_color:'yellow,white',
   feature:'multi core,wifi'
}

Does sorting these lists in alphabetical order, e.g)

{
   id:1,
   body_color:'blue,silver',
   feature:'gps,wifi'  
},
{
   id:2,
   body_color:'blue,red',
   window_color:'white,yellow',
   feature:'multi core,wifi'
}

require a smaller index size because of the more standard and less variations? Does it help for normalizing the tokens?


(Mark Walkom) #2

It doesn't help because the underlying structures don't care about ordering. Sparsity is usually the bigger concern.


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.