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 Gabriele Kahlout <ga...@mysimpatico.com> on 2011/06/03 20:42:41 UTC

How to know how many documents are indexed? Anything more elegant than parsing numFound?

$ curl "http://192.168.34.51:8080/solr/select?q=*%3A*&rows=0" >> resp.xml
$ xmlstarlet sel -t -v "//@numFound" resp.xml


-- 
Regards,
K. Gabriele

--- unchanged since 20/9/10 ---
P.S. If the subject contains "[LON]" or the addressee acknowledges the
receipt within 48 hours then I don't resend the email.
subject(this) ∈ L(LON*) ∨ ∃x. (x ∈ MyInbox ∧ Acknowledges(x, this) ∧ time(x)
< Now + 48h) ⇒ ¬resend(I, this).

If an email is sent by a sender that is not a trusted contact or the email
does not contain a valid code then the email is not received. A valid code
starts with a hyphen and ends with "X".
∀x. x ∈ MyInbox ⇒ from(x) ∈ MySafeSenderList ∨ (∃y. y ∈ subject(x) ∧ y ∈
L(-[a-z]+[0-9]X)).

Re: How to know how many documents are indexed? Anything more elegant than parsing numFound?

Posted by Gabriele Kahlout <ga...@mysimpatico.com>.
sorry, this was my bad.. should have used > and ! >> (append)

On Fri, Jun 3, 2011 at 9:45 PM, Gabriele Kahlout
<ga...@mysimpatico.com>wrote:

> $ curl --fail "http://192.168.34.51:8080/solr/admin/stats.jsp" >> resp.xml
> $ xmlstarlet sel -t -v "//@numDocs" resp.xml
> *Extra content at the end of the document*
>
>
> On Fri, Jun 3, 2011 at 8:56 PM, Ahmet Arslan <io...@yahoo.com> wrote:
>
>> : How to know how many documents are indexed? Anything more elegant than
>> : parsing numFound?
>> > $ curl "http://192.168.34.51:8080/solr/select?q=*%3A*&rows=0"
>> > >> resp.xml
>> > $ xmlstarlet sel -t -v "//@numFound" resp.xml
>>
>> solr/admin/stats.jsp is actually an xml too and contains numDocs and
>> maxDoc info.
>>
>> I think you can get numDocs with jmx too.
>> http://wiki.apache.org/solr/SolrJmx
>>
>
>
>
> --
> Regards,
> K. Gabriele
>
> --- unchanged since 20/9/10 ---
> P.S. If the subject contains "[LON]" or the addressee acknowledges the
> receipt within 48 hours then I don't resend the email.
> subject(this) ∈ L(LON*) ∨ ∃x. (x ∈ MyInbox ∧ Acknowledges(x, this) ∧
> time(x) < Now + 48h) ⇒ ¬resend(I, this).
>
> If an email is sent by a sender that is not a trusted contact or the email
> does not contain a valid code then the email is not received. A valid code
> starts with a hyphen and ends with "X".
> ∀x. x ∈ MyInbox ⇒ from(x) ∈ MySafeSenderList ∨ (∃y. y ∈ subject(x) ∧ y ∈
> L(-[a-z]+[0-9]X)).
>
>


-- 
Regards,
K. Gabriele

--- unchanged since 20/9/10 ---
P.S. If the subject contains "[LON]" or the addressee acknowledges the
receipt within 48 hours then I don't resend the email.
subject(this) ∈ L(LON*) ∨ ∃x. (x ∈ MyInbox ∧ Acknowledges(x, this) ∧ time(x)
< Now + 48h) ⇒ ¬resend(I, this).

If an email is sent by a sender that is not a trusted contact or the email
does not contain a valid code then the email is not received. A valid code
starts with a hyphen and ends with "X".
∀x. x ∈ MyInbox ⇒ from(x) ∈ MySafeSenderList ∨ (∃y. y ∈ subject(x) ∧ y ∈
L(-[a-z]+[0-9]X)).

Re: How to know how many documents are indexed? Anything more elegant than parsing numFound?

Posted by Gabriele Kahlout <ga...@mysimpatico.com>.
$ curl --fail "http://192.168.34.51:8080/solr/admin/stats.jsp" >> resp.xml
$ xmlstarlet sel -t -v "//@numDocs" resp.xml
*Extra content at the end of the document*

On Fri, Jun 3, 2011 at 8:56 PM, Ahmet Arslan <io...@yahoo.com> wrote:

> : How to know how many documents are indexed? Anything more elegant than
> : parsing numFound?
> > $ curl "http://192.168.34.51:8080/solr/select?q=*%3A*&rows=0"
> > >> resp.xml
> > $ xmlstarlet sel -t -v "//@numFound" resp.xml
>
> solr/admin/stats.jsp is actually an xml too and contains numDocs and maxDoc
> info.
>
> I think you can get numDocs with jmx too.
> http://wiki.apache.org/solr/SolrJmx
>



-- 
Regards,
K. Gabriele

--- unchanged since 20/9/10 ---
P.S. If the subject contains "[LON]" or the addressee acknowledges the
receipt within 48 hours then I don't resend the email.
subject(this) ∈ L(LON*) ∨ ∃x. (x ∈ MyInbox ∧ Acknowledges(x, this) ∧ time(x)
< Now + 48h) ⇒ ¬resend(I, this).

If an email is sent by a sender that is not a trusted contact or the email
does not contain a valid code then the email is not received. A valid code
starts with a hyphen and ends with "X".
∀x. x ∈ MyInbox ⇒ from(x) ∈ MySafeSenderList ∨ (∃y. y ∈ subject(x) ∧ y ∈
L(-[a-z]+[0-9]X)).

Re: How to know how many documents are indexed? Anything more elegant than parsing numFound?

Posted by Ahmet Arslan <io...@yahoo.com>.
: How to know how many documents are indexed? Anything more elegant than
: parsing numFound?
> $ curl "http://192.168.34.51:8080/solr/select?q=*%3A*&rows=0"
> >> resp.xml
> $ xmlstarlet sel -t -v "//@numFound" resp.xml

solr/admin/stats.jsp is actually an xml too and contains numDocs and maxDoc info. 

I think you can get numDocs with jmx too. http://wiki.apache.org/solr/SolrJmx