Query Boost Functions
I have a field named last-modified that I like to use in bf (Boot Functions) parameter: recip(rord(last-modified),1,1000,1000) in DisMaxRequestHander. However the Solr query parser complain about the syntax of the formula. I think it is related with hyphen in the field name. I have tried to add single and double quote around the field name but didn't help. Can field name contain hyphen in boot functions? How to do it? If not, where do I find the field name special character restrictions? -Yao -- View this message in context: http://www.nabble.com/Query-Boost-Functions-tp23595860p23595860.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Query Boost Functions
Yao Ge wrote: I have a field named last-modified that I like to use in bf (Boot Functions) parameter: recip(rord(last-modified),1,1000,1000) in DisMaxRequestHander. However the Solr query parser complain about the syntax of the formula. I think it is related with hyphen in the field name. I have tried to add single and double quote around the field name but didn't help. Can field name contain hyphen in boot functions? How to do it? If not, where do I find the field name special character restrictions? -Yao Hmm, this seems to be a bug. Can you open a JIRA issue? Meanwhile, you can use . or _ instead of -. Koji
Re: Query Boost Functions
On Mon, May 18, 2009 at 11:12 AM, Koji Sekiguchi k...@r.email.ne.jp wrote: Yao Ge wrote: I have a field named last-modified that I like to use in bf (Boot Functions) parameter: recip(rord(last-modified),1,1000,1000) in DisMaxRequestHander. However the Solr query parser complain about the syntax of the formula. I think it is related with hyphen in the field name. I have tried to add single and double quote around the field name but didn't help. Can field name contain hyphen in boot functions? How to do it? If not, where do I find the field name special character restrictions? -Yao Hmm, this seems to be a bug. Can you open a JIRA issue? Meanwhile, you can use . or _ instead of -. I regret not being more strict on fieldnames earlier on... I think best practice should be to limit Solr fieldnames to valid java identifiers... you're going to be much more future-proof that way (think about a future infix function query parser, nice client mappings for field names, etc). -Yonik http://www.lucidimagination.com