lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Uwe Reh <...@hebis.uni-frankfurt.de>
Subject Nested function query must use ....
Date Fri, 01 Feb 2013 21:35:55 GMT
Hi,

should be easy, but I'm to blind to find the correct syntax (Solr4.1)

Problem:
I' have some documents in the index, because of their structure they 
tend to get too high scores. This documents are easy to identify and I 
want to boost the others to get a fair ranking.

Could anyone give my the correct syntax to accomplish this simplified 
query?  "...q=*:*&fl=foo:exists(query(id:3))"

Uwe

Example:
> <response>
> <lst name="responseHeader">
>   <int name="status">400</int>
>   <int name="QTime">2</int>
>   <lst name="params">
>     <str name="fl">foo:exists(query(id:3))</str>
>     <str name="q">*:*</str>
>   </lst>
> </lst>
> <lst name="error">
>   <str name="msg">Error parsing fieldname: Nested function query must use $param
or {!v=value} forms. got 'exists(query(id:3))'</str>
>   <int name="code">400</int>
> </lst>
> </response>

But "...q=*:*&fl=foo:exists(id)" works
> <response>
> <lst name="responseHeader">
>   <int name="status">0</int>
>   <int name="QTime">1</int>
>   <lst name="params">
>     <str name="fl">foo:exists(id)</str>
>     <str name="q">*:*</str>
>     <str name="rows">1</str>
>   </lst>
> </lst>
> <result name="response" numFound="17322225" start="0">
>   <doc>
>     <bool name="foo">true</bool></doc>
> </result>
> </response>


Mime
View raw message