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:
+ *
+ * <pre>
+ * row term:docId =< value
+ * </pre>
+ *
+ * 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":
+ *
+ * <pre>
+ * row1 bob:4
+ * row1 george:2
+ * row1 steve:3
+ * </pre>
+ *
+ * This Iterator will return:
+ *
+ * <pre>
+ * row1 steve:3
+ * row1 bob:4
+ * </pre>
--- 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 [email protected] or file a JIRA ticket
with INFRA.
---