mirror of https://github.com/apache/lucene.git
fix javadoc
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1356435 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3bbbd0bea3
commit
38fc03163a
|
@ -650,7 +650,7 @@ public class CharArrayMap<V> extends AbstractMap<Object,V> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Empty {@link UnmodifiableCharArrayMap} optimized for speed.
|
* Empty {@link org.apache.lucene.analysis.util.CharArrayMap.UnmodifiableCharArrayMap} optimized for speed.
|
||||||
* Contains checks will always return <code>false</code> or throw
|
* Contains checks will always return <code>false</code> or throw
|
||||||
* NPE if necessary.
|
* NPE if necessary.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -81,7 +81,6 @@ public class CommonGramsFilterTest extends BaseTokenStreamTestCase {
|
||||||
* "foo bar the"=>"foo:1|bar:2,bar-the:2|the:3=> "foo" "bar-the" (2 tokens
|
* "foo bar the"=>"foo:1|bar:2,bar-the:2|the:3=> "foo" "bar-the" (2 tokens
|
||||||
* out)
|
* out)
|
||||||
*
|
*
|
||||||
* @return Map<String,String>
|
|
||||||
*/
|
*/
|
||||||
public void testCommonGramsQueryFilter() throws Exception {
|
public void testCommonGramsQueryFilter() throws Exception {
|
||||||
Analyzer a = new Analyzer() {
|
Analyzer a = new Analyzer() {
|
||||||
|
|
|
@ -49,8 +49,6 @@ public class ShingleAnalyzerWrapperTest extends BaseTokenStreamTestCase {
|
||||||
/**
|
/**
|
||||||
* Set up a new index in RAM with three test phrases and the supplied Analyzer.
|
* Set up a new index in RAM with three test phrases and the supplied Analyzer.
|
||||||
*
|
*
|
||||||
* @param analyzer the analyzer to use
|
|
||||||
* @return an indexSearcher on the test index.
|
|
||||||
* @throws Exception if an error occurs with index writer or searcher
|
* @throws Exception if an error occurs with index writer or searcher
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -62,9 +62,13 @@ public final class BeiderMorseFilter extends TokenFilter {
|
||||||
private final PositionIncrementAttribute posIncAtt = addAttribute(PositionIncrementAttribute.class);
|
private final PositionIncrementAttribute posIncAtt = addAttribute(PositionIncrementAttribute.class);
|
||||||
private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class);
|
private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calls {@link #BeiderMorseFilter(TokenStream, PhoneticEngine, Languages.LanguageSet)
|
* Calls
|
||||||
* BeiderMorseFilter(input, engine, null)}
|
* {@link #BeiderMorseFilter(TokenStream, PhoneticEngine, org.apache.commons.codec.language.bm.Languages.LanguageSet)}
|
||||||
|
*
|
||||||
|
* @param input
|
||||||
|
* @param engine
|
||||||
*/
|
*/
|
||||||
public BeiderMorseFilter(TokenStream input, PhoneticEngine engine) {
|
public BeiderMorseFilter(TokenStream input, PhoneticEngine engine) {
|
||||||
this(input, engine, null);
|
this(input, engine, null);
|
||||||
|
|
|
@ -27,9 +27,8 @@ import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create tokens for phonetic matches.
|
* Create tokens for phonetic matches.
|
||||||
* @see <a href="
|
* @see <a href="http://commons.apache.org/codec/api-release/org/apache/commons/codec/language/package-summary.html">
|
||||||
* http://commons.apache.org/codec/api-release/org/apache/commons/codec/language/package-summary.html
|
* Apache Commons Codec</a>
|
||||||
* ">Apache Commons Codec</a>
|
|
||||||
*/
|
*/
|
||||||
public final class PhoneticFilter extends TokenFilter
|
public final class PhoneticFilter extends TokenFilter
|
||||||
{
|
{
|
||||||
|
|
|
@ -83,7 +83,7 @@ abstract class Writer extends DocValuesConsumer {
|
||||||
* docvalues of type {@link Type#BYTES_FIXED_SORTED} and
|
* docvalues of type {@link Type#BYTES_FIXED_SORTED} and
|
||||||
* {@link Type#BYTES_VAR_SORTED}.
|
* {@link Type#BYTES_VAR_SORTED}.
|
||||||
* @return a new {@link Writer} instance for the given {@link Type}
|
* @return a new {@link Writer} instance for the given {@link Type}
|
||||||
* @see PackedInts#getReader(org.apache.lucene.store.DataInput, float)
|
* @see PackedInts#getReader(org.apache.lucene.store.DataInput)
|
||||||
*/
|
*/
|
||||||
public static DocValuesConsumer create(Type type, String id, Directory directory,
|
public static DocValuesConsumer create(Type type, String id, Directory directory,
|
||||||
Comparator<BytesRef> comp, Counter bytesUsed, IOContext context, float acceptableOverheadRatio) {
|
Comparator<BytesRef> comp, Counter bytesUsed, IOContext context, float acceptableOverheadRatio) {
|
||||||
|
|
|
@ -61,7 +61,7 @@ public final class CompositeReaderContext extends IndexReaderContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AtomicReaderContext> leaves() {
|
public List<AtomicReaderContext> leaves() throws UnsupportedOperationException {
|
||||||
if (!isTopLevel)
|
if (!isTopLevel)
|
||||||
throw new UnsupportedOperationException("This is not a top-level context.");
|
throw new UnsupportedOperationException("This is not a top-level context.");
|
||||||
assert leaves != null;
|
assert leaves != null;
|
||||||
|
|
|
@ -208,7 +208,6 @@ public abstract class DocValues implements Closeable {
|
||||||
* Returns a {@link BytesRef} for the given document id or throws an
|
* Returns a {@link BytesRef} for the given document id or throws an
|
||||||
* {@link UnsupportedOperationException} if this source doesn't support
|
* {@link UnsupportedOperationException} if this source doesn't support
|
||||||
* <tt>byte[]</tt> values.
|
* <tt>byte[]</tt> values.
|
||||||
* @throws IOException
|
|
||||||
*
|
*
|
||||||
* @throws UnsupportedOperationException
|
* @throws UnsupportedOperationException
|
||||||
* if this source doesn't support <tt>byte[]</tt> values.
|
* if this source doesn't support <tt>byte[]</tt> values.
|
||||||
|
|
|
@ -52,7 +52,7 @@ import org.apache.lucene.util.BytesRef;
|
||||||
|
|
||||||
<p>IndexReader instances for indexes on disk are usually constructed
|
<p>IndexReader instances for indexes on disk are usually constructed
|
||||||
with a call to one of the static <code>DirectoryReader.open()</code> methods,
|
with a call to one of the static <code>DirectoryReader.open()</code> methods,
|
||||||
e.g. {@link DirectoryReader#open(Directory)}. {@link DirectoryReader} implements
|
e.g. {@link DirectoryReader#open(org.apache.lucene.store.Directory)}. {@link DirectoryReader} implements
|
||||||
the {@link CompositeReader} interface, it is not possible to directly get postings.
|
the {@link CompositeReader} interface, it is not possible to directly get postings.
|
||||||
|
|
||||||
<p> For efficiency, in this API documents are often referred to via
|
<p> For efficiency, in this API documents are often referred to via
|
||||||
|
|
|
@ -52,10 +52,10 @@ public abstract class IndexReaderContext {
|
||||||
* returns itself as the only leaf.
|
* returns itself as the only leaf.
|
||||||
* <p>Note: this is convenience method since leaves can always be obtained by
|
* <p>Note: this is convenience method since leaves can always be obtained by
|
||||||
* walking the context tree using {@link #children()}.
|
* walking the context tree using {@link #children()}.
|
||||||
* @throws UnsupportedOperationExceception if this is not a top-level context.
|
* @throws UnsupportedOperationException if this is not a top-level context.
|
||||||
* @see #children()
|
* @see #children()
|
||||||
*/
|
*/
|
||||||
public abstract List<AtomicReaderContext> leaves();
|
public abstract List<AtomicReaderContext> leaves() throws UnsupportedOperationException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the context's children iff this context is a composite context
|
* Returns the context's children iff this context is a composite context
|
||||||
|
|
|
@ -275,8 +275,7 @@ public class IndexWriter implements Closeable, TwoPhaseCommit {
|
||||||
* the writer nor calling {@link #commit}.
|
* the writer nor calling {@link #commit}.
|
||||||
*
|
*
|
||||||
* <p>Note that this is functionally equivalent to calling
|
* <p>Note that this is functionally equivalent to calling
|
||||||
* {#flush} and then using {@link IndexReader#open} to
|
* {#flush} and then opening a new reader. But the turnaround time of this
|
||||||
* open a new reader. But the turnaround time of this
|
|
||||||
* method should be faster since it avoids the potentially
|
* method should be faster since it avoids the potentially
|
||||||
* costly {@link #commit}.</p>
|
* costly {@link #commit}.</p>
|
||||||
*
|
*
|
||||||
|
@ -1448,11 +1447,12 @@ public class IndexWriter implements Closeable, TwoPhaseCommit {
|
||||||
* then any thread still running this method might hit a
|
* then any thread still running this method might hit a
|
||||||
* {@link MergePolicy.MergeAbortedException}.
|
* {@link MergePolicy.MergeAbortedException}.
|
||||||
*
|
*
|
||||||
|
* @param maxNumSegments maximum number of segments left
|
||||||
|
*
|
||||||
* @throws CorruptIndexException if the index is corrupt
|
* @throws CorruptIndexException if the index is corrupt
|
||||||
* @throws IOException if there is a low-level IO error
|
* @throws IOException if there is a low-level IO error
|
||||||
* @see MergePolicy#findMerges
|
* @see MergePolicy#findMerges
|
||||||
*
|
*
|
||||||
* @param maxNumSegments maximum number of segments left
|
|
||||||
* in the index after merging finishes
|
* in the index after merging finishes
|
||||||
*/
|
*/
|
||||||
public void forceMerge(int maxNumSegments) throws IOException {
|
public void forceMerge(int maxNumSegments) throws IOException {
|
||||||
|
@ -2002,11 +2002,11 @@ public class IndexWriter implements Closeable, TwoPhaseCommit {
|
||||||
/**
|
/**
|
||||||
* Prepares the {@link SegmentInfo} for the new flushed segment and persists
|
* Prepares the {@link SegmentInfo} for the new flushed segment and persists
|
||||||
* the deleted documents {@link MutableBits}. Use
|
* the deleted documents {@link MutableBits}. Use
|
||||||
* {@link #publishFlushedSegment(SegmentInfo, FrozenBufferedDeletes, FrozenBufferedDeletes)} to
|
* {@link #publishFlushedSegment(SegmentInfoPerCommit, FrozenBufferedDeletes, FrozenBufferedDeletes)} to
|
||||||
* publish the returned {@link SegmentInfo} together with its segment private
|
* publish the returned {@link SegmentInfo} together with its segment private
|
||||||
* delete packet.
|
* delete packet.
|
||||||
*
|
*
|
||||||
* @see #publishFlushedSegment(SegmentInfo, FrozenBufferedDeletes, FrozenBufferedDeletes)
|
* @see #publishFlushedSegment(SegmentInfoPerCommit, FrozenBufferedDeletes, FrozenBufferedDeletes)
|
||||||
*/
|
*/
|
||||||
SegmentInfoPerCommit prepareFlushedSegment(FlushedSegment flushedSegment) throws IOException {
|
SegmentInfoPerCommit prepareFlushedSegment(FlushedSegment flushedSegment) throws IOException {
|
||||||
assert flushedSegment != null;
|
assert flushedSegment != null;
|
||||||
|
|
|
@ -1063,12 +1063,12 @@ public abstract class FieldComparator<T> {
|
||||||
|
|
||||||
/** Sorts by field's natural Term sort order, using
|
/** Sorts by field's natural Term sort order, using
|
||||||
* ordinals. This is functionally equivalent to {@link
|
* ordinals. This is functionally equivalent to {@link
|
||||||
* TermValComparator}, but it first resolves the string
|
* org.apache.lucene.search.FieldComparator.TermValComparator}, but it first resolves the string
|
||||||
* to their relative ordinal positions (using the index
|
* to their relative ordinal positions (using the index
|
||||||
* returned by {@link FieldCache#getTermsIndex}), and
|
* returned by {@link FieldCache#getTermsIndex}), and
|
||||||
* does most comparisons using the ordinals. For medium
|
* does most comparisons using the ordinals. For medium
|
||||||
* to large results, this comparator will be much faster
|
* to large results, this comparator will be much faster
|
||||||
* than {@link TermValComparator}. For very small
|
* than {@link org.apache.lucene.search.FieldComparator.TermValComparator}. For very small
|
||||||
* result sets it may be slower. */
|
* result sets it may be slower. */
|
||||||
public static final class TermOrdValComparator extends FieldComparator<BytesRef> {
|
public static final class TermOrdValComparator extends FieldComparator<BytesRef> {
|
||||||
/* Ords for each slot.
|
/* Ords for each slot.
|
||||||
|
@ -1469,7 +1469,7 @@ public abstract class FieldComparator<T> {
|
||||||
|
|
||||||
/** Sorts by field's natural Term sort order, using
|
/** Sorts by field's natural Term sort order, using
|
||||||
* ordinals; this is just like {@link
|
* ordinals; this is just like {@link
|
||||||
* TermOrdValComparator} except it uses DocValues to
|
* org.apache.lucene.search.FieldComparator.TermValComparator} except it uses DocValues to
|
||||||
* retrieve the sort ords saved during indexing. */
|
* retrieve the sort ords saved during indexing. */
|
||||||
public static final class TermOrdValDocValuesComparator extends FieldComparator<BytesRef> {
|
public static final class TermOrdValDocValuesComparator extends FieldComparator<BytesRef> {
|
||||||
/* Ords for each slot.
|
/* Ords for each slot.
|
||||||
|
|
|
@ -99,7 +99,7 @@ import org.apache.lucene.util.SmallFloat; // javadoc
|
||||||
* </ol>
|
* </ol>
|
||||||
* <p>
|
* <p>
|
||||||
* <a name="explaintime"/>
|
* <a name="explaintime"/>
|
||||||
* When {@link IndexSearcher#explain(Query, int)} is called, queries consult the Similarity's DocScorer for an
|
* When {@link IndexSearcher#explain(org.apache.lucene.search.Query, int)} is called, queries consult the Similarity's DocScorer for an
|
||||||
* explanation of how it computed its score. The query passes in a the document id and an explanation of how the frequency
|
* explanation of how it computed its score. The query passes in a the document id and an explanation of how the frequency
|
||||||
* was computed.
|
* was computed.
|
||||||
*
|
*
|
||||||
|
|
|
@ -611,7 +611,6 @@ public abstract class TFIDFSimilarity extends Similarity {
|
||||||
* @param termStats term-level statistics for the term
|
* @param termStats term-level statistics for the term
|
||||||
* @return an Explain object that includes both an idf score factor
|
* @return an Explain object that includes both an idf score factor
|
||||||
and an explanation for the term.
|
and an explanation for the term.
|
||||||
* @throws IOException
|
|
||||||
*/
|
*/
|
||||||
public Explanation idfExplain(CollectionStatistics collectionStats, TermStatistics termStats) {
|
public Explanation idfExplain(CollectionStatistics collectionStats, TermStatistics termStats) {
|
||||||
final long df = termStats.docFreq();
|
final long df = termStats.docFreq();
|
||||||
|
@ -632,7 +631,6 @@ public abstract class TFIDFSimilarity extends Similarity {
|
||||||
* @return an Explain object that includes both an idf
|
* @return an Explain object that includes both an idf
|
||||||
* score factor for the phrase and an explanation
|
* score factor for the phrase and an explanation
|
||||||
* for each term.
|
* for each term.
|
||||||
* @throws IOException
|
|
||||||
*/
|
*/
|
||||||
public Explanation idfExplain(CollectionStatistics collectionStats, TermStatistics termStats[]) {
|
public Explanation idfExplain(CollectionStatistics collectionStats, TermStatistics termStats[]) {
|
||||||
final long max = collectionStats.maxDoc();
|
final long max = collectionStats.maxDoc();
|
||||||
|
|
|
@ -429,9 +429,6 @@ public class PackedInts {
|
||||||
* @param acceptableOverheadRatio an acceptable overhead
|
* @param acceptableOverheadRatio an acceptable overhead
|
||||||
* ratio per value
|
* ratio per value
|
||||||
* @return a mutable packed integer array
|
* @return a mutable packed integer array
|
||||||
* @throws java.io.IOException if the Mutable could not be created. With the
|
|
||||||
* current implementations, this never happens, but the method
|
|
||||||
* signature allows for future persistence-backed Mutables.
|
|
||||||
* @lucene.internal
|
* @lucene.internal
|
||||||
*/
|
*/
|
||||||
public static Mutable getMutable(int valueCount,
|
public static Mutable getMutable(int valueCount,
|
||||||
|
|
|
@ -117,7 +117,6 @@ public class TestCrashCausesCorruptIndex extends LuceneTestCase {
|
||||||
* Run an example search.
|
* Run an example search.
|
||||||
*
|
*
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @throws ParseException
|
|
||||||
*/
|
*/
|
||||||
private void searchForFleas(final int expectedTotalHits) throws IOException {
|
private void searchForFleas(final int expectedTotalHits) throws IOException {
|
||||||
Directory realDirectory = newFSDirectory(path);
|
Directory realDirectory = newFSDirectory(path);
|
||||||
|
|
|
@ -48,7 +48,7 @@ import org.apache.lucene.util.LuceneTestCase;
|
||||||
* items in the list. If a test case fails, the name of the Similarity that
|
* items in the list. If a test case fails, the name of the Similarity that
|
||||||
* caused the failure is returned as part of the assertion error message.</p>
|
* caused the failure is returned as part of the assertion error message.</p>
|
||||||
* <p>Unit testing is performed by constructing statistics manually and calling
|
* <p>Unit testing is performed by constructing statistics manually and calling
|
||||||
* the {@link SimilarityBase#score(BasicStats, float, int)} method of the
|
* the {@link SimilarityBase#score(BasicStats, float, float)} method of the
|
||||||
* Similarities. The statistics represent corner cases of corpus distributions.
|
* Similarities. The statistics represent corner cases of corpus distributions.
|
||||||
* </p>
|
* </p>
|
||||||
* <p>For the integration tests, a small (8-document) collection is indexed. The
|
* <p>For the integration tests, a small (8-document) collection is indexed. The
|
||||||
|
@ -181,7 +181,7 @@ public class TestSimilarityBase extends LuceneTestCase {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The generic test core called by all unit test methods. It calls the
|
* The generic test core called by all unit test methods. It calls the
|
||||||
* {@link SimilarityBase#score(BasicStats, float, int)} method of all
|
* {@link SimilarityBase#score(BasicStats, float, float)} method of all
|
||||||
* Similarities in {@link #sims} and checks if the score is valid; i.e. it
|
* Similarities in {@link #sims} and checks if the score is valid; i.e. it
|
||||||
* is a finite positive real number.
|
* is a finite positive real number.
|
||||||
*/
|
*/
|
||||||
|
@ -513,7 +513,7 @@ public class TestSimilarityBase extends LuceneTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The generic test core called by all correctness test methods. It calls the
|
* The generic test core called by all correctness test methods. It calls the
|
||||||
* {@link SimilarityBase#score(BasicStats, float, int)} method of all
|
* {@link SimilarityBase#score(BasicStats, float, float)} method of all
|
||||||
* Similarities in {@link #sims} and compares the score against the manually
|
* Similarities in {@link #sims} and compares the score against the manually
|
||||||
* computed {@code gold}.
|
* computed {@code gold}.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class TestBytesRefHash extends LuceneTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test method for
|
* Test method for
|
||||||
* {@link org.apache.lucene.util.BytesRefHash#get(org.apache.lucene.util.BytesRefHash.Entry)}
|
* {@link org.apache.lucene.util.BytesRefHash#get(int, BytesRef)}
|
||||||
* .
|
* .
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -73,7 +73,7 @@ public abstract class SrndQuery implements Cloneable {
|
||||||
/** For subclasses of {@link SrndQuery} within the package
|
/** For subclasses of {@link SrndQuery} within the package
|
||||||
* {@link org.apache.lucene.queryparser.surround.query}
|
* {@link org.apache.lucene.queryparser.surround.query}
|
||||||
* it is not necessary to override this method,
|
* it is not necessary to override this method,
|
||||||
* @see #toString().
|
* @see #toString()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
|
@ -83,7 +83,7 @@ public abstract class SrndQuery implements Cloneable {
|
||||||
/** For subclasses of {@link SrndQuery} within the package
|
/** For subclasses of {@link SrndQuery} within the package
|
||||||
* {@link org.apache.lucene.queryparser.surround.query}
|
* {@link org.apache.lucene.queryparser.surround.query}
|
||||||
* it is not necessary to override this method,
|
* it is not necessary to override this method,
|
||||||
* @see #toString().
|
* @see #toString()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
|
|
|
@ -26,7 +26,7 @@ import java.util.*;
|
||||||
* A clause that compares a stored geometry to a supplied geometry.
|
* A clause that compares a stored geometry to a supplied geometry.
|
||||||
*
|
*
|
||||||
* @see <a href="http://edndoc.esri.com/arcsde/9.1/general_topics/understand_spatial_relations.htm">
|
* @see <a href="http://edndoc.esri.com/arcsde/9.1/general_topics/understand_spatial_relations.htm">
|
||||||
* ESRI's docs on spatial relations</a>
|
* ESRIs docs on spatial relations</a>
|
||||||
* @see <a href="http://docs.geoserver.org/latest/en/user/filter/ecql_reference.html#spatial-predicate">
|
* @see <a href="http://docs.geoserver.org/latest/en/user/filter/ecql_reference.html#spatial-predicate">
|
||||||
* GeoServer ECQL Spatial Predicates</a>
|
* GeoServer ECQL Spatial Predicates</a>
|
||||||
*
|
*
|
||||||
|
|
|
@ -114,8 +114,6 @@ public class ExtractingDocumentLoader extends ContentStreamLoader {
|
||||||
/**
|
/**
|
||||||
* this must be MT safe... may be called concurrently from multiple threads.
|
* this must be MT safe... may be called concurrently from multiple threads.
|
||||||
*
|
*
|
||||||
* @param
|
|
||||||
* @param
|
|
||||||
*/
|
*/
|
||||||
void doAdd(SolrContentHandler handler, AddUpdateCommand template)
|
void doAdd(SolrContentHandler handler, AddUpdateCommand template)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
|
|
@ -231,17 +231,18 @@ public class SnapPuller {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean successfulInstall = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This command downloads all the necessary files from master to install a index commit point. Only changed files are
|
* This command downloads all the necessary files from master to install a index commit point. Only changed files are
|
||||||
* downloaded. It also downloads the conf files (if they are modified).
|
* downloaded. It also downloads the conf files (if they are modified).
|
||||||
*
|
*
|
||||||
* @param core the SolrCore
|
* @param core the SolrCore
|
||||||
|
* @param force force a replication in all cases
|
||||||
* @return true on success, false if slave is already in sync
|
* @return true on success, false if slave is already in sync
|
||||||
* @throws IOException if an exception occurs
|
* @throws IOException if an exception occurs
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
private boolean successfulInstall = false;
|
|
||||||
|
|
||||||
boolean fetchLatestIndex(SolrCore core, boolean force) throws IOException, InterruptedException {
|
boolean fetchLatestIndex(SolrCore core, boolean force) throws IOException, InterruptedException {
|
||||||
successfulInstall = false;
|
successfulInstall = false;
|
||||||
replicationStartTime = System.currentTimeMillis();
|
replicationStartTime = System.currentTimeMillis();
|
||||||
|
|
|
@ -429,11 +429,11 @@ class StringStatsValues extends AbstractStatsValues<String> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines which of the given Strings is the maximum, as computed by {@link String#compareTo(Object)}
|
* Determines which of the given Strings is the maximum, as computed by {@link String#compareTo(String)}
|
||||||
*
|
*
|
||||||
* @param str1 String to compare against b
|
* @param str1 String to compare against b
|
||||||
* @param str2 String compared against a
|
* @param str2 String compared against a
|
||||||
* @return str1 if it is considered greater by {@link String#compareTo(Object)}, str2 otherwise
|
* @return str1 if it is considered greater by {@link String#compareTo(String)}, str2 otherwise
|
||||||
*/
|
*/
|
||||||
private static String max(String str1, String str2) {
|
private static String max(String str1, String str2) {
|
||||||
if (str1 == null) {
|
if (str1 == null) {
|
||||||
|
@ -445,11 +445,11 @@ class StringStatsValues extends AbstractStatsValues<String> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines which of the given Strings is the minimum, as computed by {@link String#compareTo(Object)}
|
* Determines which of the given Strings is the minimum, as computed by {@link String#compareTo(String)}
|
||||||
*
|
*
|
||||||
* @param str1 String to compare against b
|
* @param str1 String to compare against b
|
||||||
* @param str2 String compared against a
|
* @param str2 String compared against a
|
||||||
* @return str1 if it is considered less by {@link String#compareTo(Object)}, str2 otherwise
|
* @return str1 if it is considered less by {@link String#compareTo(String)}, str2 otherwise
|
||||||
*/
|
*/
|
||||||
private static String min(String str1, String str2) {
|
private static String min(String str1, String str2) {
|
||||||
if (str1 == null) {
|
if (str1 == null) {
|
||||||
|
|
|
@ -92,7 +92,7 @@ public class TermVectorComponent extends SearchComponent implements SolrCoreAwar
|
||||||
* <p>
|
* <p>
|
||||||
* Does simple (non-glob-supporting) parsing on the
|
* Does simple (non-glob-supporting) parsing on the
|
||||||
* {@link TermVectorParams#FIELDS} param if specified, otherwise it returns
|
* {@link TermVectorParams#FIELDS} param if specified, otherwise it returns
|
||||||
* the concrete field values specified in {@link CommonParams.FL} --
|
* the concrete field values specified in {@link CommonParams#FL} --
|
||||||
* ignoring functions, transformers, or literals.
|
* ignoring functions, transformers, or literals.
|
||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
|
|
|
@ -219,7 +219,6 @@ public class SimplePostTool {
|
||||||
/**
|
/**
|
||||||
* Opens the file and posts it's contents to the solrUrl,
|
* Opens the file and posts it's contents to the solrUrl,
|
||||||
* writes to response to output.
|
* writes to response to output.
|
||||||
* @throws UnsupportedEncodingException
|
|
||||||
*/
|
*/
|
||||||
public void postFile(File file, OutputStream output, String type) {
|
public void postFile(File file, OutputStream output, String type) {
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class TransformerProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return a new Transformer, possibly created from our cached Templates object
|
/** Return a new Transformer, possibly created from our cached Templates object
|
||||||
* @throws TransformerConfigurationException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
public synchronized Transformer getTransformer(SolrConfig solrConfig, String filename,int cacheLifetimeSeconds) throws IOException {
|
public synchronized Transformer getTransformer(SolrConfig solrConfig, String filename,int cacheLifetimeSeconds) throws IOException {
|
||||||
// For now, the Templates are blindly reloaded once cacheExpires is over.
|
// For now, the Templates are blindly reloaded once cacheExpires is over.
|
||||||
|
|
|
@ -16,23 +16,17 @@ package org.apache.solr.search;
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.apache.lucene.search.Query;
|
import java.util.HashSet;
|
||||||
import org.apache.lucene.search.Sort;
|
import java.util.Set;
|
||||||
import org.apache.lucene.search.SortField;
|
|
||||||
import org.apache.lucene.search.QueryUtils;
|
|
||||||
|
|
||||||
|
import org.apache.lucene.search.Query;
|
||||||
|
import org.apache.lucene.search.QueryUtils;
|
||||||
import org.apache.solr.SolrTestCaseJ4;
|
import org.apache.solr.SolrTestCaseJ4;
|
||||||
import org.apache.solr.common.SolrException;
|
|
||||||
import org.apache.solr.request.SolrQueryRequest;
|
import org.apache.solr.request.SolrQueryRequest;
|
||||||
import org.apache.solr.request.SolrRequestInfo;
|
import org.apache.solr.request.SolrRequestInfo;
|
||||||
import org.apache.solr.response.SolrQueryResponse;
|
import org.apache.solr.response.SolrQueryResponse;
|
||||||
import org.apache.solr.schema.IndexSchema;
|
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.HashSet;
|
|
||||||
|
|
||||||
import org.junit.BeforeClass;
|
|
||||||
import org.junit.AfterClass;
|
import org.junit.AfterClass;
|
||||||
|
import org.junit.BeforeClass;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,7 +38,7 @@ import org.junit.AfterClass;
|
||||||
* {@link #testParserCoverage} until you add a new test method to this class.
|
* {@link #testParserCoverage} until you add a new test method to this class.
|
||||||
*
|
*
|
||||||
* @see ValueSourceParser#standardValueSourceParsers
|
* @see ValueSourceParser#standardValueSourceParsers
|
||||||
* @see QParserPlugin.standardPlugins
|
* @see QParserPlugin#standardPlugins
|
||||||
* @see QueryUtils
|
* @see QueryUtils
|
||||||
**/
|
**/
|
||||||
public class QueryEqualityTest extends SolrTestCaseJ4 {
|
public class QueryEqualityTest extends SolrTestCaseJ4 {
|
||||||
|
@ -686,7 +680,7 @@ public class QueryEqualityTest extends SolrTestCaseJ4 {
|
||||||
* the parser being tested for coverage sanity checking
|
* the parser being tested for coverage sanity checking
|
||||||
*
|
*
|
||||||
* @see QueryUtils#check
|
* @see QueryUtils#check
|
||||||
* @see QueryUtils#checkEquals
|
* @see QueryUtils#checkEqual
|
||||||
* @see #testParserCoverage
|
* @see #testParserCoverage
|
||||||
*/
|
*/
|
||||||
protected void assertQueryEquals(final String defType,
|
protected void assertQueryEquals(final String defType,
|
||||||
|
|
|
@ -104,9 +104,6 @@ public class CloudSolrServer extends SolrServer {
|
||||||
* Connect to the zookeeper ensemble.
|
* Connect to the zookeeper ensemble.
|
||||||
* This is an optional method that may be used to force a connect before any other requests are sent.
|
* This is an optional method that may be used to force a connect before any other requests are sent.
|
||||||
*
|
*
|
||||||
* @throws IOException
|
|
||||||
* @throws TimeoutException
|
|
||||||
* @throws InterruptedException
|
|
||||||
*/
|
*/
|
||||||
public void connect() {
|
public void connect() {
|
||||||
if (zkStateReader == null) {
|
if (zkStateReader == null) {
|
||||||
|
|
|
@ -207,8 +207,8 @@ public class SolrZkClient {
|
||||||
/**
|
/**
|
||||||
* @param path
|
* @param path
|
||||||
* @return true if path exists
|
* @return true if path exists
|
||||||
* @throws KeeperException
|
|
||||||
* @param retryOnConnLoss
|
* @param retryOnConnLoss
|
||||||
|
* @throws KeeperException
|
||||||
* @throws InterruptedException
|
* @throws InterruptedException
|
||||||
*/
|
*/
|
||||||
public Boolean exists(final String path, boolean retryOnConnLoss)
|
public Boolean exists(final String path, boolean retryOnConnLoss)
|
||||||
|
|
|
@ -17,7 +17,6 @@ package org.apache.solr.common.cloud;
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.zookeeper.CreateMode;
|
import org.apache.zookeeper.CreateMode;
|
||||||
|
@ -51,10 +50,14 @@ public class ZkCmdExecutor {
|
||||||
this.retryDelay = retryDelay;
|
this.retryDelay = retryDelay;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform the given operation, retrying if the connection fails
|
* Perform the given operation, retrying if the connection fails
|
||||||
*
|
*
|
||||||
* @throws IOException
|
* @param operation
|
||||||
|
* @return
|
||||||
|
* @throws KeeperException
|
||||||
|
* @throws InterruptedException
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public <T> T retryOperation(ZkOperation operation)
|
public <T> T retryOperation(ZkOperation operation)
|
||||||
|
|
|
@ -34,7 +34,6 @@ public abstract class ZkOperation {
|
||||||
* @return the result of the operation or null
|
* @return the result of the operation or null
|
||||||
* @throws KeeperException
|
* @throws KeeperException
|
||||||
* @throws InterruptedException
|
* @throws InterruptedException
|
||||||
* @throws IOException
|
|
||||||
*/
|
*/
|
||||||
public abstract Object execute() throws KeeperException, InterruptedException;
|
public abstract Object execute() throws KeeperException, InterruptedException;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue