We are using solr's autocommit feature, which means that docs can be pending before they end up in the index, this can be confusing for users. This patch shows them how many pending docs they have (if any).

Comments

JacobSingh’s picture

Status: Active » Postponed (maintainer needs more info)

Sorry, this doesn't actually work right. I had a funny index where it looked like it was... searching for the answer still.

pwolanin’s picture

Status: Postponed (maintainer needs more info) » Active

My investigation of the Solr and Lucene java docs suggest that the index reader doe not know about pending commits - only the update handler knows about them. We could pull this info out of the page at http://localhost:8983/solr/admin/stats.jsp but that seems like a lot of overhead.

We should be able to calculate the number of docs sent based on the local indexing table, and do the diff to the numDocs in the index, I think, to report the numebr pending. This may not always be correct, of course, such as if the index was deleted on the server side or had some other side adding to the same index.

JacobSingh’s picture

Hey Peter,

I found a way to do this. Too late to post now. I'll do it tomorrow.

Best,
J

JacobSingh’s picture

StatusFileSize
new2.42 KB

Okay, this should do the trick.

JacobSingh’s picture

Status: Active » Fixed

Committed

pwolanin’s picture

Status: Fixed » Needs work

this can give an uncaught error if the page is not found, for example.

pwolanin’s picture

Status: Needs work » Needs review
StatusFileSize
new2.72 KB

cleanup patch

pwolanin’s picture

Status: Needs review » Fixed

committed #7

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.