Skip to content

Apache Lucene open-source search software

Added javadocs for FieldSelectorResult.java

Grant Ingersoll1fad6b00525e
diff --git a/CHANGES.txt b/CHANGES.txt
index 497e7e17573..f90d2951ea0 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -166,6 +166,7 @@ Documentation
2. Added scoring.xml document into xdocs. Updated Similarity.java scoring formula.(Grant Ingersoll and Steve Rowe. Updates from: Michael McCandless, Doron Cohen, Chris Hostetter, Doug Cutting). Issue 664.
+ 3. Added javadocs for FieldSelectorResult.java. (Grant Ingersoll)
Release 2.0.0 2006-05-26
diff --git a/src/java/org/apache/lucene/document/FieldSelectorResult.java b/src/java/org/apache/lucene/document/FieldSelectorResult.java
index 3f5ee287788..680f7a8c536 100755
--- a/src/java/org/apache/lucene/document/FieldSelectorResult.java
+++ b/src/java/org/apache/lucene/document/FieldSelectorResult.java
@@ -22,10 +22,42 @@ package org.apache.lucene.document;
//Replace with an enumerated type in 1.5
public final class FieldSelectorResult {
+ /**
+ * Load this {@link Field} every time the {@link Document} is loaded, reading in the data as it is encounterd.
+ * {@link Document#getField(String)} and {@link Document#getFieldable(String)} should not return null.
+ *<p/>
+ * {@link Document#add(Fieldable)} should be called by the Reader.
+ */
public static final FieldSelectorResult LOAD = new FieldSelectorResult(0);
+ /**
+ * Lazily load this {@link Field}. This means the {@link Field} is valid, but it may not actually contain its data until
+ * invoked. {@link Document#getField(String)} SHOULD NOT BE USED. {@link Document#getFieldable(String)} is safe to use and should
+ * return a valid instance of a {@link Fieldable}.
+ *<p/>
+ * {@link Document#add(Fieldable)} should be called by the Reader.
+ */
public static final FieldSelectorResult LAZY_LOAD = new FieldSelectorResult(1);
+ /**
+ * Do not load the {@link Field}. {@link Document#getField(String)} and {@link Document#getFieldable(String)} should return null.
+ * {@link Document#add(Fieldable)} is not called.
+ * <p/>
+ * {@link Document#add(Fieldable)} should not be called by the Reader.
+ */
public static final FieldSelectorResult NO_LOAD = new FieldSelectorResult(2);
+ /**
+ * Load this field as in the {@link #LOAD} case, but immediately return from {@link Field} loading for the {@link Document}. Thus, the
+ * Document may not have its complete set of Fields. {@link Document#getField(String)} and {@link Document#getFieldable(String)} should
+ * both be valid for this {@link Field}
+ * <p/>
+ * {@link Document#add(Fieldable)} should be called by the Reader.
+ */
public static final FieldSelectorResult LOAD_AND_BREAK = new FieldSelectorResult(3);
+ /**
+ * Behaves much like {@link #LOAD} but does not uncompress any compressed data. This is used for internal purposes.
+ * {@link Document#getField(String)} and {@link Document#getFieldable(String)} should not return null.
+ * <p/>
+ * {@link Document#add(Fieldable)} should be called by the Reader.
+ */
public static final FieldSelectorResult LOAD_FOR_MERGE = new FieldSelectorResult(4);
private int id;