[
https://issues.apache.org/jira/browse/LUCENE-4242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13419682#comment-13419682
]
roman commented on LUCENE-4242:
-------------------------------
Thanks for looking at it! I intended to say "1.0f - ratioDeleted" - but i
forgot the substraction
Taht was essentially the same as you suggest, just more convoluted
I will add a new patch "Math.min(1.0f, (float) reader.numDocs() /
reader.maxDoc())"
assuming:
reader.maxDoc() never returns 0
reader.maxDoc() = number of documents in the index (not the highest lucene id)
still learning lucene... and I thought that maxDoc() would return the highest
lucene int, and so if (for whatever reasons) the reader contained only the last
segment of a two-segment index, ie. a segment with docs: 50..100, and 5 were
deleted, numDoc=45, maxDoc=101
offsetDeletedDocs = min(1.0f, 45 / 101) ?
But this doesn't seem to be the case...
> UnInverted cache uses term freq to filter out terms (but deleted docs are
> included in the freq count)
> -----------------------------------------------------------------------------------------------------
>
> Key: LUCENE-4242
> URL: https://issues.apache.org/jira/browse/LUCENE-4242
> Project: Lucene - Java
> Issue Type: Bug
> Components: core/index
> Affects Versions: 4.0
> Reporter: roman
> Priority: Minor
> Attachments: LUCENE-4242.patch, LUCENE-4242.patch
>
>
> TermEnum.docFreq() count is used to compute uninverted index
> (DocTermOrds.uninvert()). The code goes like:
> final int df = te.docFreq();
> if (df <= maxTermDocFreq) {
> So, if there are deleted documents in the index and maxTermDocFreq is
> low, then the term will be excluded (even if the freq of the livedocs
> is OK). Most likely, the cache will be incomplete.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]