Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E63DED0FB for ; Sat, 16 Mar 2013 11:38:15 +0000 (UTC) Received: (qmail 94728 invoked by uid 500); 16 Mar 2013 11:38:15 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 94408 invoked by uid 500); 16 Mar 2013 11:38:14 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 94381 invoked by uid 99); 16 Mar 2013 11:38:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Mar 2013 11:38:13 +0000 Date: Sat, 16 Mar 2013 11:38:12 +0000 (UTC) From: "Robert Muir (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LUCENE-4838) Add getOrd to BytesRefHash MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-4838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13604213#comment-13604213 ] Robert Muir commented on LUCENE-4838: ------------------------------------- I dont like the method name getOrd. these arent ordinals... > Add getOrd to BytesRefHash > -------------------------- > > 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 > Attachments: 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: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org