On 7/11/06, Erick Erickson <[EMAIL PROTECTED]> wrote:
So I guess all the documents without a particular field all get defaulted for you. Which end of the list they get placed at I guess you'll find out <G>...
For lucene, it depends on what direction you are sorting. Solr gives control over this in it's schema... here are some snippets from the example schema.xml: <!-- The optional sortMissingLast and sortMissingFirst attributes are currently supported on types that are sorted internally as a strings. - If sortMissingLast="true" then a sort on this field will cause documents without the field to come after documents with the field, regardless of the requested sort order (asc or desc). - If sortMissingFirst="true" then a sort on this field will cause documents without the field to come before documents with the field, regardless of the requested sort order. - If sortMissingLast="false" and sortMissingFirst="false" (the default), then default lucene sorting will be used which places docs without the field first in an ascending sort and last in a descending sort. --> <!-- Numeric field types that manipulate the value into a string value that isn't human readable in it's internal form, but with a lexicographic ordering the same as the numeric ordering so that range queries correctly work. --> <fieldtype name="sint" class="solr.SortableIntField" sortMissingLast="true"/> <fieldtype name="slong" class="solr.SortableLongField" sortMissingLast="true"/> <fieldtype name="sfloat" class="solr.SortableFloatField" sortMissingLast="true"/> <fieldtype name="sdouble" class="solr.SortableDoubleField" sortMissingLast="true"/> -Yonik http://incubator.apache.org/solr Solr, the open-source Lucene search server --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]