Thank you Adrien. "NumericDocValuesField is the one that supports sorting."
Does this mean LongField/IntField just supports lexicographic order in sorting? - Kumaran R On Dec 22, 2016 11:28 PM, "Adrien Grand" <jpou...@gmail.com> wrote: Le jeu. 22 déc. 2016 à 18:50, Kumaran Ramasubramanian <kums....@gmail.com> a écrit : > I want to provide sorting, range search and faceting in numeric fields. > > AFAIK, Purpose of different numeric field types are, > > NumericDocValuesField supports sorting and faceting > LongField/IntField supports range query and sorting > LongField/IntField only support querying, NumericDocValuesField is the one that supports sorting. Also note that as of 6.0 LongField and IntField have been replaced with LongPoint and IntPoint. > 1. Should i duplicate one field in above mentioned types to achieve all the > three features in numeric? > Yes. By the way it is perfectly fine to use the same field name for the point field and the doc values field. > 2. If i am ready to sacrifice faceting, is it advisable to use LongField > for sorting and range query? > Like said above you need doc values for sorting. > 3. During sorting, Will NumericDocValuesField( column stride storage) > perform better than LongField(trie structure)? If so , should i duplicate > field in both 1 and 2 cases? > Same note here. Adrien