Internal: MoreLikeThisQueryParser to refer to index taken from QueryShardContext rather than QueryParseContext

The reason behind this change is that we will soon remove the index member from QueryParseContext, as parsing will be independent of the index it happens against.
This commit is contained in:
javanna 2015-08-31 10:01:56 +02:00 committed by Luca Cavanna
parent cc408ddd45
commit c403bdbd62

View File

@ -256,7 +256,7 @@ public class MoreLikeThisQueryParser extends BaseQueryParserTemp {
for (TermVectorsRequest item : items) {
if (item.index() == null) {
item.index(parseContext.index().name());
item.index(context.index().name());
}
if (item.type() == null) {
if (context.queryTypes().size() > 1) {