Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the _val_: do in Solr and what is it for?

Tags:

function

solr

I am new to Solr and I am trying to get my head around it. I can't for the life of me find any decent documentation for Solr. I've checked on the official page to see what _val_ does but it doesn't explain it well.

If someone can explain it here and give examples of how it's used that would be great!

like image 859
Johnathan Au Avatar asked Jan 08 '14 08:01

Johnathan Au


1 Answers

_val_ is a hook provided by Solr for FunctionQuery. You can pass in a function to the query to manipulate the score of a document.

Ex:

_val_:"recip(rord(myfield),1,2,3)"

Refer here for the SolrQuerySyntax

like image 189
Srikanth Venugopalan Avatar answered Nov 06 '22 20:11

Srikanth Venugopalan