LUCENE-3438: move FilteredTermsEnum, SingleTermsEnum to oal.index

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1171489 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2011-09-16 10:23:38 +00:00
parent 24695807f3
commit 4f553352d1
16 changed files with 29 additions and 25 deletions

View File

@ -21,7 +21,7 @@ import java.io.IOException;
import java.text.Collator;
import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.search.FilteredTermsEnum;
import org.apache.lucene.index.FilteredTermsEnum;
import org.apache.lucene.util.BytesRef;
/**

View File

@ -18,7 +18,7 @@ package org.apache.lucene.sandbox.queries.regex;
*/
import org.apache.lucene.search.MultiTermQuery;
import org.apache.lucene.search.FilteredTermsEnum;
import org.apache.lucene.index.FilteredTermsEnum;
import org.apache.lucene.search.RegexpQuery; // javadoc
import org.apache.lucene.index.Term;
import org.apache.lucene.index.Terms;

View File

@ -17,7 +17,7 @@ package org.apache.lucene.sandbox.queries.regex;
* limitations under the License.
*/
import org.apache.lucene.search.FilteredTermsEnum;
import org.apache.lucene.index.FilteredTermsEnum;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.util.BytesRef;

View File

@ -20,7 +20,6 @@ package org.apache.lucene.index;
import java.io.IOException;
import java.util.Comparator;
import org.apache.lucene.search.FilteredTermsEnum;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.IntsRef;
import org.apache.lucene.util.automaton.ByteRunAutomaton;

View File

@ -1,4 +1,4 @@
package org.apache.lucene.search;
package org.apache.lucene.index;
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -21,15 +21,9 @@ import java.io.IOException;
import java.util.Comparator;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.index.TermState;
import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.index.DocsEnum;
import org.apache.lucene.index.DocsAndPositionsEnum;
import org.apache.lucene.util.AttributeSource;
import org.apache.lucene.util.Bits;
// TODO: move this class to oal.index
/**
* Abstract class for enumerating a subset of all terms.
*

View File

@ -1,4 +1,4 @@
package org.apache.lucene.search;
package org.apache.lucene.index;
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -19,15 +19,16 @@ package org.apache.lucene.search;
import java.io.IOException;
import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.search.MultiTermQuery; // javadocs
import org.apache.lucene.util.BytesRef;
/**
* Subclass of FilteredTermsEnum for enumerating a single term.
* <p>
* This can be used by {@link MultiTermQuery}s that need only visit one term,
* but want to preserve MultiTermQuery semantics such as
* {@link MultiTermQuery#rewriteMethod}.
* For example, this can be used by {@link MultiTermQuery}s
* that need only visit one term, but want to preserve
* MultiTermQuery semantics such as {@link
* MultiTermQuery#rewriteMethod}.
*/
public final class SingleTermsEnum extends FilteredTermsEnum {
private final BytesRef singleRef;

View File

@ -17,6 +17,9 @@ package org.apache.lucene.search;
* limitations under the License.
*/
import java.io.IOException;
import org.apache.lucene.index.SingleTermsEnum;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.Terms;
import org.apache.lucene.index.TermsEnum;
@ -24,8 +27,6 @@ import org.apache.lucene.util.AttributeSource;
import org.apache.lucene.util.ToStringUtils;
import org.apache.lucene.util.automaton.LevenshteinAutomata;
import java.io.IOException;
/** Implements the fuzzy search query. The similarity measurement
* is based on the Levenshtein (edit distance) algorithm.
*

View File

@ -28,6 +28,7 @@ import org.apache.lucene.index.Term;
import org.apache.lucene.index.TermState;
import org.apache.lucene.index.Terms;
import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.index.FilteredTermsEnum;
import org.apache.lucene.util.Attribute;
import org.apache.lucene.util.AttributeImpl;
import org.apache.lucene.util.AttributeSource;

View File

@ -19,7 +19,9 @@ package org.apache.lucene.search;
import java.io.IOException;
import org.apache.lucene.index.FilteredTermsEnum; // javadocs
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.SingleTermsEnum; // javadocs
import org.apache.lucene.index.Term;
import org.apache.lucene.index.Terms;
import org.apache.lucene.index.TermsEnum;

View File

@ -18,17 +18,18 @@ package org.apache.lucene.search;
*/
import java.io.IOException;
import java.util.LinkedList;
import java.util.Comparator;
import java.util.LinkedList;
import org.apache.lucene.analysis.NumericTokenStream; // for javadocs
import org.apache.lucene.document.NumericField; // for javadocs
import org.apache.lucene.util.NumericUtils;
import org.apache.lucene.util.ToStringUtils;
import org.apache.lucene.index.FilteredTermsEnum;
import org.apache.lucene.index.Terms;
import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.util.AttributeSource;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.util.NumericUtils;
import org.apache.lucene.util.ToStringUtils;
/**
* <p>A {@link Query} that matches numeric values within a
@ -169,7 +170,7 @@ public final class NumericRangeQuery<T extends Number> extends MultiTermQuery {
// For bigger precisionSteps this query likely
// hits too many terms, so set to CONSTANT_SCORE_FILTER right off
// (especially as the FilteredTermEnum is costly if wasted only for AUTO tests because it
// (especially as the FilteredTermsEnum is costly if wasted only for AUTO tests because it
// creates new enums from IndexReader for each sub-range)
switch (valSize) {
case 64:

View File

@ -19,6 +19,7 @@ package org.apache.lucene.search;
import java.io.IOException;
import org.apache.lucene.index.FilteredTermsEnum;
import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.util.BytesRef;

View File

@ -20,6 +20,7 @@ package org.apache.lucene.search;
import java.io.IOException;
import java.util.Comparator;
import org.apache.lucene.index.FilteredTermsEnum;
import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.util.BytesRef;

View File

@ -24,7 +24,7 @@ import java.util.List;
import org.apache.lucene.index.Terms;
import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.search.PrefixTermsEnum;
import org.apache.lucene.search.SingleTermsEnum;
import org.apache.lucene.index.SingleTermsEnum;
import org.apache.lucene.util.BytesRef;
/**

View File

@ -25,6 +25,7 @@ import org.apache.lucene.document.TextField;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.MultiFields;
import org.apache.lucene.index.RandomIndexWriter;
import org.apache.lucene.index.SingleTermsEnum;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.Terms;
import org.apache.lucene.index.TermsEnum;

View File

@ -24,11 +24,12 @@ import org.apache.lucene.analysis.MockTokenizer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.document.StringField;
import org.apache.lucene.index.FilteredTermsEnum;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.RandomIndexWriter;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.Terms;
import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.index.RandomIndexWriter;
import org.apache.lucene.index.codecs.CodecProvider;
import org.apache.lucene.store.Directory;
import org.apache.lucene.util.AttributeSource;

View File

@ -27,6 +27,7 @@ import org.apache.lucene.analysis.MockTokenizer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.document.StringField;
import org.apache.lucene.index.FilteredTermsEnum;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.RandomIndexWriter;
import org.apache.lucene.index.Term;