If the 'query' returned a count, yes. But my problem is exactly that as far as 
I can see from the description of the 'query' function, it does NOT return the 
count but the score of the search.
 
So my quetion is;
 
How can I write a 'query' function that returns a count, not a score?
 
Cheers,
Gert.
 
 

________________________________

From: Koji Sekiguchi [mailto:k...@r.email.ne.jp]
Sent: Sun 4/25/2010 2:15 AM
To: solr-user@lucene.apache.org
Subject: Re: Howto build a function query using the 'query' function



Villemos, Gert wrote:
> I want to build a function expression for a dismax request handler 'bf'
> field, to boost the documents if it is referenced by other documents.
> I.e. the more often a document is referenced, the higher the boost.
>
> 
>
> Something like
>
> 
> <bf>linear(query(myQueryReturningACountOfHowOftenThisDocumentIsReference
> d, 1), 0.01, 1)</bf>
>
> 
>
> Intended to mean;
>
> if count is 0, then the boost is 0*0.01+1 = 1
>
> if count is 1, then the boost is 1*0.01+1 = 1.01
>
> If count is 100, then the boost is 100*0.01 + 1 = 2
>
> 
>
> However the query function
> (http://wiki.apache.org/solr/FunctionQuery#query) seems to only be able
> to return the score of the query results, not the count of results.
>
>  
Probably I'm missing something, but doesn't just using
linear function meet your needs? i.e.

linear(myQueryReturningACountOfHowOftenThisDocumentIsReferenced, 0.01,1)

Koji

--
http://www.rondhuit.com/en/






Please help Logica to respect the environment by not printing this email  / 
Pour contribuer comme Logica au respect de l'environnement, merci de ne pas 
imprimer ce mail /  Bitte drucken Sie diese Nachricht nicht aus und helfen Sie 
so Logica dabei, die Umwelt zu schützen. /  Por favor ajude a Logica a 
respeitar o ambiente nao imprimindo este correio electronico.



This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.

Reply via email to