You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@solr.apache.org by "Heller, George A III CTR (USA)" <ge...@mail.mil.INVALID> on 2022/02/23 16:49:59 UTC

How does solr populate the numFound field in a query response?

We have Solr  installed on a primary server and a failover server. When I index a collection on the primary, all the files indexed are created on disk and get copied to disk on the failover server via replication.

Querying the core on the primary shows the correct number of documents (numFound="21194") and the same query done on the failover server shows numFound="0".

 

Does the numFound come from the database? If so, why do I see the correct number of records on the server where the collection was not indexed, but see 0 on the failover server?

 

The query is performed by navigating to the Solr Admin website http://localhost:8983/solr  

, selecting one of our cores

, clicking Query Then clicking [Execute Query]. No parameters are selected, so we get all documents in the collection.

The code below is what Solr returned. 

 

Where does it get numFound="21194" from?

The reason I ask is because when we query a core on our primary server where we indexed the collection, it returns the correct number of documents as seen below. When we do the exact same thing on the failover server it shows numFound="0"

 

 

 

** Below is a query XML response with numFound in it for reference

 

<?xml version="1.0" encoding="UTF-8"?>

<response>

 

<lst name="responseHeader">

  <int name="status">0</int>

  <int name="QTime">2</int>

  <lst name="params">

    <str name="q">*:*</str>

    <str name="indent">true</str>

    <str name="q.op">OR</str>

    <str name="_">1643299742083</str>

  </lst>

</lst>

<result name="response" numFound="21194" start="0" numFoundExact="true">

 

 

Thanks

 

 

 

 


Re: [URL Verdict: Unknown][Non-DoD Source] Re: How does solr populate the numFound field in a query response?

Posted by matthew sporleder <ms...@gmail.com>.
Force a commit on the failover and see what happens.

Using OS-level disk replication is definitely the cause.

On Wed, Feb 23, 2022 at 2:42 PM Heller, George A III CTR (USA)
<ge...@mail.mil> wrote:
>
> >
> > Can you expand on "replication" and "indexing" and also versions of solr etc?
> >
> INDEXING - We are referring indexof the Solr collection. The indexing commands are issued from out ASP,NET applications.
>
> REPLICATION - We are referring to Windows replication. The primary and failover servers copy all changed/new files to their cluster mate.
>
> SOLR VERSIONS - We are using Solr 3.6.1 and Solr 8.11.1. We are experiencing the same problems in both versions in TEST. Rvrtything works finw in production.
>
>
> > Does the "replica" respond with data or does it give a blank?  Does it
> > have files on its disk?
> >
> Both servers return valid XML data in the Solr admin website.  The only difference is the value of the numFound attribute.
> Both servers have all the files on disk in their respective collection\data\index folders.
>
>
> -----Original Message-----
> From: matthew sporleder <ms...@gmail.com>
> Sent: Wednesday, February 23, 2022 12:00 PM
> To: users@solr.apache.org
> Cc: Heller, George A III CTR (USA) <ge...@mail.mil>
> Subject: [URL Verdict: Unknown][Non-DoD Source] Re: How does solr populate the numFound field in a query response?
>
> All active links contained in this email were disabled.  Please verify the identity of the sender, and confirm the authenticity of all links contained within the message prior to copying and pasting the address to a Web browser.
>
> ----
>
> re-trying bounce
>
> On Wed, Feb 23, 2022 at 11:55 AM matthew sporleder <ms...@gmail.com> wrote:
> >
> > Can you expand on "replication" and "indexing" and also versions of solr etc?
> >
> > Does the "replica" respond with data or does it give a blank?  Does it
> > have files on its disk?
> >
> > On Wed, Feb 23, 2022 at 11:51 AM Heller, George A III CTR (USA)
> > <ge...@mail.mil.invalid> wrote:
> > >
> > > We have Solr  installed on a primary server and a failover server. When I index a collection on the primary, all the files indexed are created on disk and get copied to disk on the failover server via replication.
> > >
> > > Querying the core on the primary shows the correct number of documents (numFound=”21194”) and the same query done on the failover server shows numFound=”0”.
> > >
> > >
> > >
> > > Does the numFound come from the database? If so, why do I see the correct number of records on the server where the collection was not indexed, but see 0 on the failover server?
> > >
> > >
> > >
> > > The query is performed by navigating to the Solr Admin website
> > > Caution-http://localhost:8983/solr
> > >
> > > , selecting one of our cores
> > >
> > > , clicking Query Then clicking [Execute Query]. No parameters are selected, so we get all documents in the collection.
> > >
> > > The code below is what Solr returned.
> > >
> > >
> > >
> > > Where does it get numFound="21194" from?
> > >
> > > The reason I ask is because when we query a core on our primary server where we indexed the collection, it returns the correct number of documents as seen below. When we do the exact same thing on the failover server it shows numFound=”0”
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > ** Below is a query XML response with numFound in it for reference
> > >
> > >
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > >
> > > <response>
> > >
> > >
> > >
> > > <lst name="responseHeader">
> > >
> > >   <int name="status">0</int>
> > >
> > >   <int name="QTime">2</int>
> > >
> > >   <lst name="params">
> > >
> > >     <str name="q">*:*</str>
> > >
> > >     <str name="indent">true</str>
> > >
> > >     <str name="q.op">OR</str>
> > >
> > >     <str name="_">1643299742083</str>
> > >
> > >   </lst>
> > >
> > > </lst>
> > >
> > > <result name="response" numFound="21194" start="0"
> > > numFoundExact="true">
> > >
> > >
> > >
> > >
> > >
> > > Thanks
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >

Re: How does solr populate the numFound field in a query response?

Posted by matthew sporleder <ms...@gmail.com>.
re-trying bounce

On Wed, Feb 23, 2022 at 11:55 AM matthew sporleder <ms...@gmail.com> wrote:
>
> Can you expand on "replication" and "indexing" and also versions of solr etc?
>
> Does the "replica" respond with data or does it give a blank?  Does it
> have files on its disk?
>
> On Wed, Feb 23, 2022 at 11:51 AM Heller, George A III CTR (USA)
> <ge...@mail.mil.invalid> wrote:
> >
> > We have Solr  installed on a primary server and a failover server. When I index a collection on the primary, all the files indexed are created on disk and get copied to disk on the failover server via replication.
> >
> > Querying the core on the primary shows the correct number of documents (numFound=”21194”) and the same query done on the failover server shows numFound=”0”.
> >
> >
> >
> > Does the numFound come from the database? If so, why do I see the correct number of records on the server where the collection was not indexed, but see 0 on the failover server?
> >
> >
> >
> > The query is performed by navigating to the Solr Admin website http://localhost:8983/solr
> >
> > , selecting one of our cores
> >
> > , clicking Query Then clicking [Execute Query]. No parameters are selected, so we get all documents in the collection.
> >
> > The code below is what Solr returned.
> >
> >
> >
> > Where does it get numFound="21194" from?
> >
> > The reason I ask is because when we query a core on our primary server where we indexed the collection, it returns the correct number of documents as seen below. When we do the exact same thing on the failover server it shows numFound=”0”
> >
> >
> >
> >
> >
> >
> >
> > ** Below is a query XML response with numFound in it for reference
> >
> >
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> >
> > <response>
> >
> >
> >
> > <lst name="responseHeader">
> >
> >   <int name="status">0</int>
> >
> >   <int name="QTime">2</int>
> >
> >   <lst name="params">
> >
> >     <str name="q">*:*</str>
> >
> >     <str name="indent">true</str>
> >
> >     <str name="q.op">OR</str>
> >
> >     <str name="_">1643299742083</str>
> >
> >   </lst>
> >
> > </lst>
> >
> > <result name="response" numFound="21194" start="0" numFoundExact="true">
> >
> >
> >
> >
> >
> > Thanks
> >
> >
> >
> >
> >
> >
> >
> >

Re: How does solr populate the numFound field in a query response?

Posted by matthew sporleder <ms...@gmail.com>.
Can you expand on "replication" and "indexing" and also versions of solr etc?

Does the "replica" respond with data or does it give a blank?  Does it
have files on its disk?

On Wed, Feb 23, 2022 at 11:51 AM Heller, George A III CTR (USA)
<ge...@mail.mil.invalid> wrote:
>
> We have Solr  installed on a primary server and a failover server. When I index a collection on the primary, all the files indexed are created on disk and get copied to disk on the failover server via replication.
>
> Querying the core on the primary shows the correct number of documents (numFound=”21194”) and the same query done on the failover server shows numFound=”0”.
>
>
>
> Does the numFound come from the database? If so, why do I see the correct number of records on the server where the collection was not indexed, but see 0 on the failover server?
>
>
>
> The query is performed by navigating to the Solr Admin website http://localhost:8983/solr
>
> , selecting one of our cores
>
> , clicking Query Then clicking [Execute Query]. No parameters are selected, so we get all documents in the collection.
>
> The code below is what Solr returned.
>
>
>
> Where does it get numFound="21194" from?
>
> The reason I ask is because when we query a core on our primary server where we indexed the collection, it returns the correct number of documents as seen below. When we do the exact same thing on the failover server it shows numFound=”0”
>
>
>
>
>
>
>
> ** Below is a query XML response with numFound in it for reference
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <response>
>
>
>
> <lst name="responseHeader">
>
>   <int name="status">0</int>
>
>   <int name="QTime">2</int>
>
>   <lst name="params">
>
>     <str name="q">*:*</str>
>
>     <str name="indent">true</str>
>
>     <str name="q.op">OR</str>
>
>     <str name="_">1643299742083</str>
>
>   </lst>
>
> </lst>
>
> <result name="response" numFound="21194" start="0" numFoundExact="true">
>
>
>
>
>
> Thanks
>
>
>
>
>
>
>
>