mirror of https://github.com/apache/lucene.git
ensure all queries classes have javadocs (thanks to Chris Male)
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1388303 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
642bcfc4d0
commit
a6c6cf6f6e
|
@ -253,7 +253,7 @@
|
||||||
<check-missing-javadocs dir="build/docs/join" level="method"/>
|
<check-missing-javadocs dir="build/docs/join" level="method"/>
|
||||||
<check-missing-javadocs dir="build/docs/memory" level="method"/>
|
<check-missing-javadocs dir="build/docs/memory" level="method"/>
|
||||||
<check-missing-javadocs dir="build/docs/misc" level="class"/>
|
<check-missing-javadocs dir="build/docs/misc" level="class"/>
|
||||||
<!-- queries: problems -->
|
<check-missing-javadocs dir="build/docs/queries" level="class"/>
|
||||||
<!-- queryparser: problems -->
|
<!-- queryparser: problems -->
|
||||||
<check-missing-javadocs dir="build/docs/sandbox" level="class"/>
|
<check-missing-javadocs dir="build/docs/sandbox" level="class"/>
|
||||||
<check-missing-javadocs dir="build/docs/spatial" level="class"/>
|
<check-missing-javadocs dir="build/docs/spatial" level="class"/>
|
||||||
|
|
|
@ -87,7 +87,14 @@ public abstract class FunctionValues {
|
||||||
public int numOrd() { throw new UnsupportedOperationException(); }
|
public int numOrd() { throw new UnsupportedOperationException(); }
|
||||||
public abstract String toString(int doc);
|
public abstract String toString(int doc);
|
||||||
|
|
||||||
/** @lucene.experimental */
|
/**
|
||||||
|
* Abstraction of the logic required to fill the value of a specified doc into
|
||||||
|
* a reusable {@link MutableValue}. Implementations of {@link FunctionValues}
|
||||||
|
* are encouraged to define their own implementations of ValueFiller if their
|
||||||
|
* value is not a float.
|
||||||
|
*
|
||||||
|
* @lucene.experimental
|
||||||
|
*/
|
||||||
public static abstract class ValueFiller {
|
public static abstract class ValueFiller {
|
||||||
/** MutableValue will be reused across calls */
|
/** MutableValue will be reused across calls */
|
||||||
public abstract MutableValue getValue();
|
public abstract MutableValue getValue();
|
||||||
|
|
|
@ -24,6 +24,10 @@ import org.apache.lucene.util.Bits;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@link Scorer} which returns the result of {@link FunctionValues#floatVal(int)} as
|
||||||
|
* the score for a document.
|
||||||
|
*/
|
||||||
public class ValueSourceScorer extends Scorer {
|
public class ValueSourceScorer extends Scorer {
|
||||||
protected final IndexReader reader;
|
protected final IndexReader reader;
|
||||||
private int doc = -1;
|
private int doc = -1;
|
||||||
|
|
|
@ -22,7 +22,10 @@ import org.apache.lucene.queries.function.ValueSource;
|
||||||
import org.apache.lucene.util.mutable.MutableValue;
|
import org.apache.lucene.util.mutable.MutableValue;
|
||||||
import org.apache.lucene.util.mutable.MutableValueBool;
|
import org.apache.lucene.util.mutable.MutableValueBool;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Abstract {@link FunctionValues} implementation which supports retrieving boolean values.
|
||||||
|
* Implementations can control how the boolean values are loaded through {@link #boolVal(int)}}
|
||||||
|
*/
|
||||||
public abstract class BoolDocValues extends FunctionValues {
|
public abstract class BoolDocValues extends FunctionValues {
|
||||||
protected final ValueSource vs;
|
protected final ValueSource vs;
|
||||||
|
|
||||||
|
|
|
@ -155,6 +155,9 @@ public abstract class DocTermsIndexDocValues extends FunctionValues {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom Exception to be thrown when the DocTermsIndex for a field cannot be generated
|
||||||
|
*/
|
||||||
public static final class DocTermsIndexException extends RuntimeException {
|
public static final class DocTermsIndexException extends RuntimeException {
|
||||||
|
|
||||||
public DocTermsIndexException(final String fieldName, final RuntimeException cause) {
|
public DocTermsIndexException(final String fieldName, final RuntimeException cause) {
|
||||||
|
|
|
@ -22,6 +22,10 @@ import org.apache.lucene.queries.function.ValueSource;
|
||||||
import org.apache.lucene.util.mutable.MutableValue;
|
import org.apache.lucene.util.mutable.MutableValue;
|
||||||
import org.apache.lucene.util.mutable.MutableValueDouble;
|
import org.apache.lucene.util.mutable.MutableValueDouble;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Abstract {@link FunctionValues} implementation which supports retrieving double values.
|
||||||
|
* Implementations can control how the double values are loaded through {@link #doubleVal(int)}}
|
||||||
|
*/
|
||||||
public abstract class DoubleDocValues extends FunctionValues {
|
public abstract class DoubleDocValues extends FunctionValues {
|
||||||
protected final ValueSource vs;
|
protected final ValueSource vs;
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,10 @@ import org.apache.lucene.queries.function.ValueSource;
|
||||||
import org.apache.lucene.util.mutable.MutableValue;
|
import org.apache.lucene.util.mutable.MutableValue;
|
||||||
import org.apache.lucene.util.mutable.MutableValueFloat;
|
import org.apache.lucene.util.mutable.MutableValueFloat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Abstract {@link FunctionValues} implementation which supports retrieving float values.
|
||||||
|
* Implementations can control how the float values are loaded through {@link #floatVal(int)}}
|
||||||
|
*/
|
||||||
public abstract class FloatDocValues extends FunctionValues {
|
public abstract class FloatDocValues extends FunctionValues {
|
||||||
protected final ValueSource vs;
|
protected final ValueSource vs;
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,10 @@ import org.apache.lucene.queries.function.ValueSource;
|
||||||
import org.apache.lucene.util.mutable.MutableValue;
|
import org.apache.lucene.util.mutable.MutableValue;
|
||||||
import org.apache.lucene.util.mutable.MutableValueInt;
|
import org.apache.lucene.util.mutable.MutableValueInt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Abstract {@link FunctionValues} implementation which supports retrieving int values.
|
||||||
|
* Implementations can control how the int values are loaded through {@link #intVal(int)}
|
||||||
|
*/
|
||||||
public abstract class IntDocValues extends FunctionValues {
|
public abstract class IntDocValues extends FunctionValues {
|
||||||
protected final ValueSource vs;
|
protected final ValueSource vs;
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,10 @@ import org.apache.lucene.queries.function.ValueSource;
|
||||||
import org.apache.lucene.util.mutable.MutableValue;
|
import org.apache.lucene.util.mutable.MutableValue;
|
||||||
import org.apache.lucene.util.mutable.MutableValueLong;
|
import org.apache.lucene.util.mutable.MutableValueLong;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Abstract {@link FunctionValues} implementation which supports retrieving long values.
|
||||||
|
* Implementations can control how the long values are loaded through {@link #longVal(int)}}
|
||||||
|
*/
|
||||||
public abstract class LongDocValues extends FunctionValues {
|
public abstract class LongDocValues extends FunctionValues {
|
||||||
protected final ValueSource vs;
|
protected final ValueSource vs;
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,10 @@ import org.apache.lucene.queries.function.ValueSource;
|
||||||
import org.apache.lucene.util.mutable.MutableValue;
|
import org.apache.lucene.util.mutable.MutableValue;
|
||||||
import org.apache.lucene.util.mutable.MutableValueStr;
|
import org.apache.lucene.util.mutable.MutableValueStr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Abstract {@link FunctionValues} implementation which supports retrieving String values.
|
||||||
|
* Implementations can control how the String values are loaded through {@link #strVal(int)}}
|
||||||
|
*/
|
||||||
public abstract class StrDocValues extends FunctionValues {
|
public abstract class StrDocValues extends FunctionValues {
|
||||||
protected final ValueSource vs;
|
protected final ValueSource vs;
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,10 @@ package org.apache.lucene.queries.function.valuesource;
|
||||||
|
|
||||||
import org.apache.lucene.queries.function.ValueSource;
|
import org.apache.lucene.queries.function.ValueSource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Abstract parent class for those {@link ValueSource} implementations which
|
||||||
|
* apply boolean logic to their values
|
||||||
|
*/
|
||||||
public abstract class BoolFunction extends ValueSource {
|
public abstract class BoolFunction extends ValueSource {
|
||||||
// TODO: placeholder to return type, among other common future functionality
|
// TODO: placeholder to return type, among other common future functionality
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,12 @@ import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@link ValueSource} implementation which only returns the values from the provided
|
||||||
|
* ValueSources which are available for a particular docId. Consequently, when combined
|
||||||
|
* with a {@link ConstValueSource}, this function serves as a way to return a default
|
||||||
|
* value when the values for a field are unavailable.
|
||||||
|
*/
|
||||||
public class DefFunction extends MultiFunction {
|
public class DefFunction extends MultiFunction {
|
||||||
public DefFunction(List<ValueSource> sources) {
|
public DefFunction(List<ValueSource> sources) {
|
||||||
super(sources);
|
super(sources);
|
||||||
|
|
|
@ -26,6 +26,10 @@ import org.apache.lucene.search.IndexSearcher;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Abstract {@link ValueSource} implementation which wraps two ValueSources
|
||||||
|
* and applies an extendible float function to their values.
|
||||||
|
**/
|
||||||
public abstract class DualFloatFunction extends ValueSource {
|
public abstract class DualFloatFunction extends ValueSource {
|
||||||
protected final ValueSource a;
|
protected final ValueSource a;
|
||||||
protected final ValueSource b;
|
protected final ValueSource b;
|
||||||
|
|
|
@ -27,7 +27,10 @@ import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Abstract {@link ValueSource} implementation which wraps multiple ValueSources
|
||||||
|
* and applies an extendible boolean function to their values.
|
||||||
|
**/
|
||||||
public abstract class MultiBoolFunction extends BoolFunction {
|
public abstract class MultiBoolFunction extends BoolFunction {
|
||||||
protected final List<ValueSource> sources;
|
protected final List<ValueSource> sources;
|
||||||
|
|
||||||
|
|
|
@ -28,9 +28,9 @@ import java.io.IOException;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Abstract {@link ValueSource} implementation which wraps multiple ValueSources
|
||||||
*
|
* and applies an extendible float function to their values.
|
||||||
**/ // a simple function of multiple sources
|
**/
|
||||||
public abstract class MultiFloatFunction extends ValueSource {
|
public abstract class MultiFloatFunction extends ValueSource {
|
||||||
protected final ValueSource[] sources;
|
protected final ValueSource[] sources;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,10 @@ import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Abstract parent class for {@link ValueSource} implementations that wrap multiple
|
||||||
|
* ValueSources and apply their own logic.
|
||||||
|
*/
|
||||||
public abstract class MultiFunction extends ValueSource {
|
public abstract class MultiFunction extends ValueSource {
|
||||||
protected final List<ValueSource> sources;
|
protected final List<ValueSource> sources;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,13 @@ import org.apache.lucene.search.IndexSearcher;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@link BoolFunction} implementation which applies an extendible boolean
|
||||||
|
* function to the values of a single wrapped {@link ValueSource}.
|
||||||
|
*
|
||||||
|
* Functions this can be used for include whether a field has a value or not,
|
||||||
|
* or inverting the boolean value of the wrapped ValueSource.
|
||||||
|
*/
|
||||||
public abstract class SimpleBoolFunction extends BoolFunction {
|
public abstract class SimpleBoolFunction extends BoolFunction {
|
||||||
protected final ValueSource source;
|
protected final ValueSource source;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue