So for a requirement where I have a field which is used for sorting, faceting and searching what should be the better field definition.
Can it be *<field name="manu_exact" type="string" indexed="true" stored="false" docValues="true" />* or Two fields each for sorting+faceting and for searching like following. *<field name="manu_exact" type="string" indexed="true" stored="false" /><field name="manu_exact_sort" type="string" indexed="false" stored="false" docValues="true" />* Kindly note that it will be better if can use existing field for sorting, faceting and add searching on it like in example one above. Regards, Modassar On Tue, Feb 24, 2015 at 11:15 PM, Erick Erickson <erickerick...@gmail.com> wrote: > Hmmm, that's not my understanding. docValues are simply a different > layout for storing > the _indexed_ values that facilitates rapid loading of the field from > disk, essentially > putting the uninverted field value in a conveniently-loadable form. > > So AFAIK, the field is stored only once and used for all three, > sorting, faceting and > searching. > > Best, > Erick > > On Tue, Feb 24, 2015 at 4:13 AM, Modassar Ather <modather1...@gmail.com> > wrote: > > Thanks for your response Mikhail. > > > > On Tue, Feb 24, 2015 at 5:35 PM, Mikhail Khludnev < > > mkhlud...@griddynamics.com> wrote: > > > >> Both statements seem true to me. > >> > >> On Tue, Feb 24, 2015 at 2:49 PM, Modassar Ather <modather1...@gmail.com > > > >> wrote: > >> > >> > Hi, > >> > > >> > Kindly help me understand the behavior of following field. > >> > > >> > <field name="manu_exact" type="string" indexed="true" stored="false" > >> > docValues="true" /> > >> > > >> > For a field like above where indexed="true" and docValues="true", is > it > >> > that: > >> > 1) For sorting/faceting on *manu_exact* the docValues will be used. > >> > 2) For querying on *manu_exact* the inverted index will be used. > >> > > >> > Thanks, > >> > Modassar > >> > > >> > >> > >> > >> -- > >> Sincerely yours > >> Mikhail Khludnev > >> Principal Engineer, > >> Grid Dynamics > >> > >> <http://www.griddynamics.com> > >> <mkhlud...@griddynamics.com> > >> >