Remove redundant parseElementst() method in RescorePhase and SuggestPhase

The default implementation in SearchPhase does the same.
This commit is contained in:
Christoph Büscher 2016-06-10 16:12:45 +02:00
parent 3b96055b23
commit f20928b146
2 changed files with 0 additions and 22 deletions

View File

@ -24,13 +24,10 @@ import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.common.component.AbstractComponent;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.search.SearchParseElement;
import org.elasticsearch.search.SearchPhase;
import org.elasticsearch.search.internal.SearchContext;
import java.io.IOException;
import java.util.Collections;
import java.util.Map;
/**
*/
@ -41,15 +38,6 @@ public class RescorePhase extends AbstractComponent implements SearchPhase {
super(settings);
}
/**
* rescorers do not have a parse element, they use
* {@link RescoreBuilder#parseFromXContent(org.elasticsearch.index.query.QueryParseContext)} for parsing instead.
*/
@Override
public Map<String, ? extends SearchParseElement> parseElements() {
return Collections.emptyMap();
}
@Override
public void preProcess(SearchContext context) {
}

View File

@ -23,7 +23,6 @@ import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.common.component.AbstractComponent;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.search.SearchParseElement;
import org.elasticsearch.search.SearchPhase;
import org.elasticsearch.search.internal.SearchContext;
import org.elasticsearch.search.suggest.Suggest.Suggestion;
@ -36,8 +35,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import static java.util.Collections.emptyMap;
/**
*/
public class SuggestPhase extends AbstractComponent implements SearchPhase {
@ -47,13 +44,6 @@ public class SuggestPhase extends AbstractComponent implements SearchPhase {
super(settings);
}
@Override
public Map<String, ? extends SearchParseElement> parseElements() {
// this is used to parse SearchSourceBuilder.ext() bytes
// we don't allow any suggestion parsing for the extension
return emptyMap();
}
@Override
public void preProcess(SearchContext context) {
}