Re: How to set a condition on the number of docs found

2013-07-12 Thread Matt Lieber
Thanks William, I'll do that.

Matt


On 7/12/13 7:38 AM, "William Bell"  wrote:

>Hmmm. One way is:
>
>http://localhost:8983/solr/core/select/?q=*%3A*&facet=true&facet.field=id&;
>facet.offset=10&rows=0&facet.limit=1dersearch/select/?q=*%3A*&facet=true&facet.field=city&facet.offset=10&rows
>=0&facet.limit=1>
>
>If you have a result you have results > 10.
>
>Another way is to just look at it wth a facet.query and have your app deal
>with it.
>
>http:/localhost:8983/solr/core/select/?q=*%3A*&facet=true&facet.query={!lu
>cene%20key=numberofresults}state:CO&rows=0/providersearch/select/?q=*%3A*&facet=true&facet.query={!lucene%20key=numb
>erofresults}state:CO&rows=0>
>
>
>
>
>On Thu, Jul 11, 2013 at 11:45 PM, Matt Lieber  wrote:
>
>> 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.
>>
>
>
>
>--
>Bill Bell
>billnb...@gmail.com
>cell 720-256-8076









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.


Re: How to set a condition on the number of docs found

2013-07-12 Thread Jack Krupansky
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. 



Re: How to set a condition on the number of docs found

2013-07-12 Thread William Bell
Hmmm. One way is:

http://localhost:8983/solr/core/select/?q=*%3A*&facet=true&facet.field=id&facet.offset=10&rows=0&facet.limit=1

If you have a result you have results > 10.

Another way is to just look at it wth a facet.query and have your app deal
with it.

http:/localhost:8983/solr/core/select/?q=*%3A*&facet=true&facet.query={!lucene%20key=numberofresults}state:CO&rows=0




On Thu, Jul 11, 2013 at 11:45 PM, Matt Lieber  wrote:

> 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.
>



-- 
Bill Bell
billnb...@gmail.com
cell 720-256-8076


Re: How to set a condition on the number of docs found

2013-07-12 Thread Furkan KAMACI
Do you want to modify Solr source code? Did you check that line at
XMLWriter.java :

*writeAttr("numFound",Long.toString(numFound));*




2013/7/12 Matt Lieber 

> 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.
>


How to set a condition on the number of docs found

2013-07-11 Thread Matt Lieber
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.