[ 
https://issues.apache.org/jira/browse/LUCENE-2662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913628#action_12913628
 ] 

Robert Muir commented on LUCENE-2662:
-------------------------------------

Jason: what I am saying is if i look at the method in your patch:

public T add(BytesRef bytes)

the first thing it does is compute the hash, but this is already computed in 
the analysis chain.

why not have
{code}
public T add(BytesRef bytes, int hashCode)
{code}

and also:
{code}
public T add(BytesRef bytes) {
  return add(bytes, bytes.hashCode());
}
{code}

then we can avoid computing this twice, and keep the optimization in UnicodeUtil


> BytesHash
> ---------
>
>                 Key: LUCENE-2662
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2662
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: Realtime Branch
>            Reporter: Jason Rutherglen
>            Priority: Minor
>             Fix For: Realtime Branch
>
>         Attachments: LUCENE-2662.patch
>
>
> This issue will have the BytesHash separated out from LUCENE-2186

-- 
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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to