Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 15956 invoked from network); 9 Aug 2008 17:03:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Aug 2008 17:03:17 -0000 Received: (qmail 86421 invoked by uid 500); 9 Aug 2008 17:03:14 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 86383 invoked by uid 500); 9 Aug 2008 17:03:14 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 86374 invoked by uid 99); 9 Aug 2008 17:03:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Aug 2008 10:03:14 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Aug 2008 17:02:16 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4667C234C19E for ; Sat, 9 Aug 2008 10:02:44 -0700 (PDT) Message-ID: <455916353.1218301364287.JavaMail.jira@brutus> Date: Sat, 9 Aug 2008 10:02:44 -0700 (PDT) From: "Mark Miller (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Updated: (LUCENE-1001) Add Payload retrieval to Spans In-Reply-To: <30226253.1189910912130.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-1001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Miller updated LUCENE-1001: -------------------------------- Attachment: LUCENE-1001.patch Without the absolute paths in the patch this time (get it together eclipse) > Add Payload retrieval to Spans > ------------------------------ > > Key: LUCENE-1001 > URL: https://issues.apache.org/jira/browse/LUCENE-1001 > Project: Lucene - Java > Issue Type: New Feature > Components: Search > Reporter: Grant Ingersoll > Assignee: Grant Ingersoll > Priority: Minor > Fix For: 2.4 > > Attachments: LUCENE-1001.patch, LUCENE-1001.patch, LUCENE-1001.patch > > > It will be nice to have access to payloads when doing SpanQuerys. > See http://www.gossamer-threads.com/lists/lucene/java-dev/52270 and http://www.gossamer-threads.com/lists/lucene/java-dev/51134 > Current API, added to Spans.java is below. I will try to post a patch as soon as I can figure out how to make it work for unordered spans (I believe I have all the other cases working). > {noformat} > /** > * Returns the payload data for the current span. > * This is invalid until {@link #next()} is called for > * the first time. > * This method must not be called more than once after each call > * of {@link #next()}. However, payloads are loaded lazily, > * so if the payload data for the current position is not needed, > * this method may not be called at all for performance reasons.
> *
> *

> * WARNING: The status of the Payloads feature is experimental. > * The APIs introduced here might change in the future and will not be > * supported anymore in such a case. > * > * @return a List of byte arrays containing the data of this payload > * @throws IOException > */ > // TODO: Remove warning after API has been finalized > List/**/ getPayload() throws IOException; > /** > * Checks if a payload can be loaded at this position. > *

> * Payloads can only be loaded once per call to > * {@link #next()}. > *

> *

> * WARNING: The status of the Payloads feature is experimental. > * The APIs introduced here might change in the future and will not be > * supported anymore in such a case. > * > * @return true if there is a payload available at this position that can be loaded > */ > // TODO: Remove warning after API has been finalized > public boolean isPayloadAvailable(); > {noformat} -- 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