You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Joe Pollard <Jo...@bazaarvoice.com> on 2009/04/07 18:40:58 UTC

_val:ord(field) (from wiki LargeIndexes)

I see this interesting line in the wiki page LargeIndexes  http://wiki.apache.org/solr/LargeIndexes (sorting section towards the bottom)

Using _val:ord(field) as a search term will sort the results without incurring the memory cost.

I'd like to know what this means, but I'm having a bit of trouble parsing it....  What is _val:ord(field) exactly?  Does this just mean that I should pass in the ordinal of the field instead of the fieldname in the query?  Which portion of the memory cost is being avoided doing this?

Re: _val:ord(field) (from wiki LargeIndexes)

Posted by Chris Hostetter <ho...@fucit.org>.
: I see this interesting line in the wiki page LargeIndexes 
: http://wiki.apache.org/solr/LargeIndexes (sorting section towards the 
: bottom)
: 
: Using _val:ord(field) as a search term will sort the results without 
: incurring the memory cost.
: 
: I'd like to know what this means, but I'm having a bit of trouble 
: parsing it....  What is _val:ord(field) exactly?  Does this just mean 

that's refering to using function queries with the "_val_" hack that is 
supported by the LuceneQParserPlugin...
    http://wiki.apache.org/solr/SolrQuerySyntax

...it *seems* to be suggesting that if you use a function query based on 
the ordinal value of a field, you won't need the same amount of memory as 
if you just sorted on that field ... but that is incorrect, so i removed 
that like from the page.  (for string fields, the same FieldCache is 
initialized either way, for non string fields following that advice could 
result in 2 or 3 times as much memory being needed for both the numeric 
FieldCache and the String FieldCache entries)


-Hoss