lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-985) AIOOB thrown when length of termText is longer than 16384 characters (ArrayIndexOutOfBoundsException)
Date Sat, 18 Aug 2007 00:16:30 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520727
] 

Michael McCandless commented on LUCENE-985:
-------------------------------------------

> As a clarification point for people who stumble upon this issue
> years from now after encountering whatever exception we put in place
> of the current one...why is there a max termText length?

This is because DocumentsWriter packs the term text for each unique
term seen into a pool of char[] blocks of 16384 chars each (to avoid
GC overhead of each separate String).  So, every time a new term is
seen, it puts it at the end of the current block; when there's not
enough space it allocates another block from the pool.  So a given
term must fit entirely into a single block.


> AIOOB thrown when length of termText is longer than 16384 characters (ArrayIndexOutOfBoundsException)
> -----------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-985
>                 URL: https://issues.apache.org/jira/browse/LUCENE-985
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>    Affects Versions: 2.3
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.3
>
>
> DocumentsWriter has a max term length of 16384; if you cross that you
> get an unfriendly ArrayIndexOutOfBoundsException.  We should fix to raise a clearer exception.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message