On 3/21/13 10:50 PM, Shawn Heisey wrote:
On 3/21/2013 4:05 AM, Per Steffensen wrote:
Can anyone else elaborate? How to "activate" it? How to make sure, for
sorting, that sort-field-value for all docs are not read into memory for
sorting - leading to OOM when you have a lot of docs? Can this feature
be activated on top of an existing 4.0 index, or do you have to re-index
everything?
There is one requirement that may not be obvious - every document must
have a value in the field, so you must either make the field either
required or give it a default value in the schema. Solr 4.2 will
refuse to start the core if this requirement is not met.
That is not problem for us. The field exist on every document.
The example schema hints that the value might need to be
single-valued. I have not tested this. Sorting is already
problematic on multi-valued fields, so I assume that this won't be the
case for you.
That is not a problem for us either. The field is single-valued.
To use docValues, add docValues="true" and then either set
required="true" or default="<somevalue>" on the field definition in
schema.xml, restart Solr or reload the core, and reindex. Your index
will get bigger.
So the answer to "...or do you have to re-index everything?" is yes!?
If the touted behavior of handling the sort mechanism in OS disk cache
memory (or just reading the disk if there's not enough memory) rather
than heap is correct, then it should solve your issues. I hope it does!
Me too. I will find out soon - I hope! But re-indexing is kinda a
problem for us, but we will figure out.
Any "guide to re-index all you stuff" anywhere, so I do it the easiest
way? Guess maybe there are some nice tricks about steaming data directly
from one Solr running the old index into a new Solr running the new
index, and then discard the old index afterwards?
Thanks,
Shawn
Thanks a lot, Shawn!
Regards, Per Steffensen