Fixing warnings and errors in javadoc

This commit is contained in:
Christoph Büscher 2015-09-22 13:01:05 +02:00
parent 1aae68d2e8
commit 5ebb074e57
15 changed files with 11 additions and 38 deletions

View File

@ -244,9 +244,6 @@ public abstract class AbstractQueryBuilder<QB extends AbstractQueryBuilder> exte
* {@link Query} instances. {@link QueryBuilder} that return <tt>null</tt> calling
* their {@link QueryBuilder#toQuery(QueryShardContext)} method are not added to the
* resulting collection.
*
* @throws IOException
* @throws QueryShardException
*/
protected static Collection<Query> toQueries(Collection<QueryBuilder> queryBuilders, QueryShardContext context) throws QueryShardException,
IOException {

View File

@ -292,10 +292,6 @@ public class GeoDistanceQueryBuilder extends AbstractQueryBuilder<GeoDistanceQue
geoDistance.writeTo(out);
}
/**
* @param indexCreatedBeforeV2_0
* @return
*/
private QueryValidationException checkLatLon(boolean indexCreatedBeforeV2_0) {
// validation was not available prior to 2.x, so to support bwc percolation queries we only ignore_malformed on 2.x created indexes
if (ignoreMalformed || indexCreatedBeforeV2_0) {

View File

@ -84,7 +84,7 @@ public class GeoShapeQueryBuilder extends AbstractQueryBuilder<GeoShapeQueryBuil
* Creates a new GeoShapeQueryBuilder whose Query will be against the given
* field name using the given Shape
*
* @param name
* @param fieldName
* Name of the field that will be queried
* @param shape
* Shape used in the Query

View File

@ -61,7 +61,7 @@ public class MissingQueryBuilder extends AbstractQueryBuilder<MissingQueryBuilde
* @param fieldPattern the field to query
* @param nullValue should the missing filter automatically include fields with null value configured in the
* mappings. Defaults to <tt>false</tt>.
* @param existance should the missing filter include documents where the field doesn't exist in the docs.
* @param existence should the missing filter include documents where the field doesn't exist in the docs.
* Defaults to <tt>true</tt>.
* @throws IllegalArgumentException when both <tt>existence</tt> and <tt>nullValue</tt> are set to false
*/

View File

@ -429,7 +429,7 @@ public class MultiMatchQueryBuilder extends AbstractQueryBuilder<MultiMatchQuery
}
/**
* Set a cutoff value in [0..1] (or absolute number >=1) representing the
* Set a cutoff value in [0..1] (or absolute number &gt;=1) representing the
* maximum threshold of a terms document frequency to be considered a low
* frequency term.
*/

View File

@ -37,8 +37,6 @@ public interface QueryBuilder<QB extends QueryBuilder> extends NamedWriteable<QB
*
* @param context additional information needed to construct the queries
* @return the {@link Query} or <tt>null</tt> if this query should be ignored upstream
* @throws QueryShardException
* @throws IOException
*/
Query toQuery(QueryShardContext context) throws IOException;
@ -49,8 +47,6 @@ public interface QueryBuilder<QB extends QueryBuilder> extends NamedWriteable<QB
*
* @param context additional information needed to construct the queries
* @return the {@link Query} or <tt>null</tt> if this query should be ignored upstream
* @throws QueryShardException
* @throws IOException
*/
Query toFilter(QueryShardContext context) throws IOException;

View File

@ -617,7 +617,7 @@ public abstract class QueryBuilders {
* A filter to filter based on a specific range from a specific geo location / point.
*
* @param name The location field name.
* @param point The point as geohash
* @param geohash The point as geohash
*/
public static GeoDistanceRangeQueryBuilder geoDistanceRangeQuery(String name, String geohash) {
return new GeoDistanceRangeQueryBuilder(name, geohash);
@ -694,7 +694,6 @@ public abstract class QueryBuilders {
*
* @param name The shape field name
* @param shape Shape to use in the filter
* @param relation relation of the shapes
*/
public static GeoShapeQueryBuilder geoShapeQuery(String name, ShapeBuilder shape) throws IOException {
return new GeoShapeQueryBuilder(name, shape);
@ -769,7 +768,7 @@ public abstract class QueryBuilders {
/**
* A filter to filter only documents where a field does not exists in them.
* @param fieldPattern the field to query
* @param name the field to query
*/
public static MissingQueryBuilder missingQuery(String name) {
return missingQuery(name, MissingQueryBuilder.DEFAULT_NULL_VALUE, MissingQueryBuilder.DEFAULT_EXISTENCE_VALUE);
@ -777,7 +776,7 @@ public abstract class QueryBuilders {
/**
* A filter to filter only documents where a field does not exists in them.
* @param fieldPattern the field to query
* @param name the field to query
* @param nullValue should the missing filter automatically include fields with null value configured in the
* mappings. Defaults to <tt>false</tt>.
* @param existence should the missing filter include documents where the field doesn't exist in the docs.

View File

@ -122,7 +122,6 @@ public class QueryParseContext {
/**
* @return a new QueryBuilder based on the current state of the parser
* @throws IOException
*/
public QueryBuilder parseInnerQueryBuilder() throws IOException {
// move to START object
@ -163,7 +162,6 @@ public class QueryParseContext {
/**
* @return a new QueryBuilder based on the current state of the parser, but does so that the inner query
* is parsed to a filter
* @throws IOException
*/
//norelease setting and checking the isFilter Flag should completely be moved to toQuery/toFilter after query refactoring
public QueryBuilder parseInnerFilterToQueryBuilder() throws IOException {

View File

@ -39,7 +39,7 @@ public interface QueryParser<QB extends QueryBuilder<QB>> {
* Parses the into a query from the current parser location. Will be at
* "START_OBJECT" location, and should end when the token is at the matching
* "END_OBJECT".
* <p/>
* <p>
* Returns <tt>null</tt> if this query should be ignored in the context of
* the DSL.
*/
@ -56,7 +56,6 @@ public interface QueryParser<QB extends QueryBuilder<QB>> {
* this context will be changed as a side effect of this method
* call
* @return the new QueryBuilder
* @throws IOException
*/
QB fromXContent(QueryParseContext parseContext) throws IOException;

View File

@ -101,7 +101,7 @@ public class SpanNearQueryBuilder extends AbstractQueryBuilder<SpanNearQueryBuil
}
/**
* @see SpanNearQueryBuilder#inOrder(boolean))
* @see SpanNearQueryBuilder#inOrder(boolean)
*/
public boolean inOrder() {
return this.inOrder;
@ -116,7 +116,7 @@ public class SpanNearQueryBuilder extends AbstractQueryBuilder<SpanNearQueryBuil
}
/**
* @see SpanNearQueryBuilder#collectPayloads(boolean))
* @see SpanNearQueryBuilder#collectPayloads(boolean)
*/
public boolean collectPayloads() {
return this.collectPayloads;

View File

@ -37,7 +37,6 @@ import org.elasticsearch.common.ParseFieldMatcher;
import org.elasticsearch.common.collect.Tuple;
import org.elasticsearch.common.compress.CompressedXContent;
import org.elasticsearch.common.inject.AbstractModule;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.inject.Injector;
import org.elasticsearch.common.inject.ModulesBuilder;
import org.elasticsearch.common.inject.multibindings.Multibinder;
@ -59,11 +58,6 @@ import org.elasticsearch.index.Index;
import org.elasticsearch.index.IndexNameModule;
import org.elasticsearch.index.analysis.AnalysisModule;
import org.elasticsearch.index.cache.IndexCacheModule;
import org.elasticsearch.index.fielddata.IndexFieldData;
import org.elasticsearch.index.fielddata.IndexFieldDataService;
import org.elasticsearch.index.fielddata.IndexGeoPointFieldData;
import org.elasticsearch.index.fielddata.plain.GeoPointDoubleArrayIndexFieldData;
import org.elasticsearch.index.mapper.MappedFieldType;
import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.index.query.functionscore.ScoreFunctionParser;
import org.elasticsearch.index.query.support.QueryParsers;
@ -132,7 +126,7 @@ public abstract class AbstractQueryTestCase<QB extends AbstractQueryBuilder<QB>>
protected static String[] getCurrentTypes() {
return currentTypes;
}
private static NamedWriteableRegistry namedWriteableRegistry;
private static String[] randomTypes;
@ -140,7 +134,6 @@ public abstract class AbstractQueryTestCase<QB extends AbstractQueryBuilder<QB>>
/**
* Setup for the whole base test class.
* @throws IOException
*/
@BeforeClass
public static void init() throws IOException {

View File

@ -83,7 +83,6 @@ public class DisMaxQueryBuilderTests extends AbstractQueryTestCase<DisMaxQueryBu
/**
* test `null`return value for missing inner queries
* @throws IOException
*/
@Test
public void testNoInnerQueries() throws IOException {

View File

@ -38,7 +38,6 @@ public class IdsQueryBuilderTests extends AbstractQueryTestCase<IdsQueryBuilder>
/**
* check that parser throws exception on missing values field
* @throws IOException
*/
@Test(expected=ParsingException.class)
public void testIdsNotProvided() throws IOException {

View File

@ -59,9 +59,6 @@ public class NotQueryBuilderTests extends AbstractQueryTestCase<NotQueryBuilder>
}
}
/**
* @throws IOException
*/
@Test(expected=ParsingException.class)
public void testMissingFilterSection() throws IOException {
String queryString = "{ \"not\" : {}";

View File

@ -54,7 +54,7 @@ public class QueryFilterBuilderTests extends AbstractQueryTestCase<QueryFilterBu
}
/**
* test wrapping an inner filter that returns null also returns <tt>null</null> to pass on upwards
* test that wrapping an inner filter that returns <tt>null</tt> also returns <tt>null</tt> to pass on upwards
*/
@Test
public void testInnerQueryReturnsNull() throws IOException {