Test where? I mean, "numFound" is right there at the top of the query results, right?

Unfortunately there is no function query value source equivalent to "numFound". There is "numdocs", but that is the total documents in the index. There is also docfreq(term), which could be used in a function query (including the "fl" parameter) if you know a term that has a 1-to-1 relationship to your query results.

It is worth filing a Jira to add "numfound()" as a function query value source.

-- Jack Krupansky

-----Original Message----- From: Matt Lieber
Sent: Friday, July 12, 2013 1:45 AM
To: solr-user@lucene.apache.org
Subject: How to set a condition on the number of docs found

Hello there,

I would like to be able to know whether I got over a certain threshold of
doc results.

I.e. Test (Result.numFound > 10 ) -> true.

Is there a way to do this ? I can't seem to find how to do this; (other
than have to do this test on the client app, which is not great).

Thanks,
Matt


________________________________






NOTE: This message may contain information that is confidential, proprietary, privileged or otherwise protected by law. The message is intended solely for the named addressee. If received in error, please destroy and notify the sender. Any use of this email is prohibited when received in error. Impetus does not represent, warrant and/or guarantee, that the integrity of this communication has been maintained nor that the communication is free of errors, virus, interception or interference.

Reply via email to