lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <>
Subject Re: Query Boost Functions
Date Tue, 19 May 2009 00:19:49 GMT
On Mon, May 18, 2009 at 11:12 AM, Koji Sekiguchi <> 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).


View raw message