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 Robert Gründler <ro...@dubture.com> on 2011/03/29 16:01:05 UTC
DisMaxQueryParser: Unknown function min in FunctionQuery
Hi all,
i'm trying to implement a FunctionQuery using the "bf" parameter of the
DisMaxQueryParser, however, i'm getting an exception:
"Unknown function min in FunctionQuery('min(1,2)', pos=4)"
The request that causes the error looks like this:
http://localhost:2345/solr/main/select?qt=dismax&qf=name^0.1&qf=name_exact^10.0&debugQuery=true&bf=min(1,2)&version=1.2&wt=json&json.nl=map&q=+foo&start=0&rows=3
I'm not sure where the "pos=4" part of the FunctionQuery is coming from.
My Solr version is 1.4.1.
Has anyone a hint why i'm getting this error?
thanks!
-robert
Conditional Scoring (was: Re: DisMaxQueryParser: Unknown function
min in FunctionQuery)
Posted by Robert Gründler <ro...@dubture.com>.
sorry, didn't see that.
So, as also the relevance functions are only available in solr > 4.0
(http://wiki.apache.org/solr/FunctionQuery#Relevance_Functions), i'm not
sure if i can solve our requirement in one query ( i thought i could use
a function query for this).
Here's our Problem:
We have 3 Fields:
1. exact_match ( text )
2. fuzzy_match ( text )
3. popularity ( integer )
Our requirement looks as follows:
All results which have a match in "exact_match" MUST score higher than
results without a match in "exact_match", regardless of the value in the
"popularity" field. All results which have no match in "exact_match"
should use the "popularity" field for scoring.
Is this possible without using a function query ?
thanks.
-robert
On 29.03.11 16:34, Erik Hatcher wrote:
> On Mar 29, 2011, at 10:01 , Robert Gründler wrote:
>
>> Hi all,
>>
>> i'm trying to implement a FunctionQuery using the "bf" parameter of the DisMaxQueryParser, however, i'm getting an exception:
>>
>> "Unknown function min in FunctionQuery('min(1,2)', pos=4)"
>>
>> The request that causes the error looks like this:
>>
>> http://localhost:2345/solr/main/select?qt=dismax&qf=name^0.1&qf=name_exact^10.0&debugQuery=true&bf=min(1,2)&version=1.2&wt=json&json.nl=map&q=+foo&start=0&rows=3
>>
>>
>> I'm not sure where the "pos=4" part of the FunctionQuery is coming from.
>>
>> My Solr version is 1.4.1.
>>
>> Has anyone a hint why i'm getting this error?
> From http://wiki.apache.org/solr/FunctionQuery#min - min() is 3.2 (though I think that really means 3.1 now, right??). Definitely not in 1.4.1.
>
> Erik
>
Re: DisMaxQueryParser: Unknown function min in FunctionQuery
Posted by Erik Hatcher <er...@gmail.com>.
On Mar 29, 2011, at 10:01 , Robert Gründler wrote:
> Hi all,
>
> i'm trying to implement a FunctionQuery using the "bf" parameter of the DisMaxQueryParser, however, i'm getting an exception:
>
> "Unknown function min in FunctionQuery('min(1,2)', pos=4)"
>
> The request that causes the error looks like this:
>
> http://localhost:2345/solr/main/select?qt=dismax&qf=name^0.1&qf=name_exact^10.0&debugQuery=true&bf=min(1,2)&version=1.2&wt=json&json.nl=map&q=+foo&start=0&rows=3
>
>
> I'm not sure where the "pos=4" part of the FunctionQuery is coming from.
>
> My Solr version is 1.4.1.
>
> Has anyone a hint why i'm getting this error?
From http://wiki.apache.org/solr/FunctionQuery#min - min() is 3.2 (though I think that really means 3.1 now, right??). Definitely not in 1.4.1.
Erik