lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4156) Improve implementation of DirectoryTaxonomyWriter.getSize()
Date Wed, 20 Jun 2012 10:08:43 GMT


Shai Erera commented on LUCENE-4156:

You're right, 2 extra method calls are not worth the defensive code. If we'll change getSize(),
I hope that we'll remember to fix getParent too. At any rate, the reason we check the size
is for throwing a friendlier exception with text. If someone passes an invalid ordinal, he'll
get AIOOBE anyway, just without the text.

I'll commit this now.
> Improve implementation of DirectoryTaxonomyWriter.getSize()
> -----------------------------------------------------------
>                 Key: LUCENE-4156
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: modules/facet
>            Reporter: Sivan Yogev
>            Assignee: Shai Erera
>            Priority: Minor
>         Attachments: LUCENE-4156.patch
> Current implementation of DirectoryTaxonomyWriter.getSize() is synchrionized and invokes
indexWriter.maxDoc(), both harming performance.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message