Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 07698200C53 for ; Tue, 11 Apr 2017 18:35:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 06051160B9B; Tue, 11 Apr 2017 16:35:24 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4D919160B7D for ; Tue, 11 Apr 2017 18:35:23 +0200 (CEST) Received: (qmail 68410 invoked by uid 500); 11 Apr 2017 16:35:22 -0000 Mailing-List: contact dev-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list dev@accumulo.apache.org Received: (qmail 68399 invoked by uid 99); 11 Apr 2017 16:35:22 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Apr 2017 16:35:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 226CBDFF71; Tue, 11 Apr 2017 16:35:22 +0000 (UTC) From: joshelser To: dev@accumulo.apache.org Reply-To: dev@accumulo.apache.org References: In-Reply-To: Subject: [GitHub] accumulo pull request #247: ACCUMULO-3208 Integration test for the OrIterato... Content-Type: text/plain Message-Id: <20170411163522.226CBDFF71@git1-us-west.apache.org> Date: Tue, 11 Apr 2017 16:35:22 +0000 (UTC) archived-at: Tue, 11 Apr 2017 16:35:24 -0000 Github user joshelser commented on a diff in the pull request: https://github.com/apache/accumulo/pull/247#discussion_r110951592 --- Diff: core/src/main/java/org/apache/accumulo/core/iterators/OrIterator.java --- @@ -30,36 +33,66 @@ import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.data.Range; import org.apache.accumulo.core.data.Value; +import org.apache.commons.lang.StringUtils; import org.apache.hadoop.io.Text; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * An iterator that handles "OR" query constructs on the server side. This code has been adapted/merged from Heap and Multi Iterators. + * + * The table structure should have the following form: + * + *
    + * row term:docId =< value
    + * 
+ * + * This Iterator will return a sorted iteration of docIDs for a given set of terms. + * + * For example, given the data and an OR'ing of "bob,steve": + * + *
    + * row1 bob:4
    + * row1 george:2
    + * row1 steve:3
    + * 
+ * + * This Iterator will return: + * + *
    + * row1 steve:3
    + * row1 bob:4
    + * 
--- End diff -- Good point. The way is was written before required you to write your own iterator to use it (adding `TermSource`'s on your own). I'll expand the class-level javadoc to better describe these two usages. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---