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).
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | catch-text-373921-7.patch | 2.72 KB | pwolanin |
| #4 | apachesolr_pending_docs.diff | 2.42 KB | JacobSingh |
| pendingdocs_on_index.diff | 1023 bytes | JacobSingh |
Comments
Comment #1
JacobSingh commentedSorry, this doesn't actually work right. I had a funny index where it looked like it was... searching for the answer still.
Comment #2
pwolanin commentedMy 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.
Comment #3
JacobSingh commentedHey Peter,
I found a way to do this. Too late to post now. I'll do it tomorrow.
Best,
J
Comment #4
JacobSingh commentedOkay, this should do the trick.
Comment #5
JacobSingh commentedCommitted
Comment #6
pwolanin commentedthis can give an uncaught error if the page is not found, for example.
Comment #7
pwolanin commentedcleanup patch
Comment #8
pwolanin commentedcommitted #7