[
https://issues.apache.org/jira/browse/LUCENE-4838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shai Erera resolved LUCENE-4838.
--------------------------------
Resolution: Fixed
Fix Version/s: 4.3
5.0
Committed to trunk and 4x. Thanks Simon!
> Add BytesRefHash.find()
> -----------------------
>
> Key: LUCENE-4838
> URL: https://issues.apache.org/jira/browse/LUCENE-4838
> Project: Lucene - Core
> Issue Type: New Feature
> Components: core/other
> Reporter: Shai Erera
> Assignee: Shai Erera
> Priority: Minor
> Fix For: 5.0, 4.3
>
> Attachments: LUCENE-4838.patch, LUCENE-4838.patch, LUCENE-4838.patch
>
>
> There is no API today to query BytesRefHash for the existence of a certain
> BytesRef. Rather, you should use .add(), which looks up the given bytes, and
> hashes them if they are not found, or returns their ord if they are found.
> I would like to add a simple getOrd API which will return the ord of a given
> BytesRef, or -1 if not found. I would like to use that API in the facet
> module, and I need to be able to query the hash without necessarily adding
> elements to it.
> I have a simple patch, will post shortly.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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]