|
@@ -29,8 +29,6 @@ import org.elasticsearch.common.collect.Tuple;
|
|
|
import org.elasticsearch.common.component.AbstractComponent;
|
|
|
import org.elasticsearch.common.joda.DateMathParser;
|
|
|
import org.elasticsearch.common.joda.FormatDateTimeFormatter;
|
|
|
-import org.elasticsearch.common.logging.DeprecationLogger;
|
|
|
-import org.elasticsearch.common.logging.Loggers;
|
|
|
import org.elasticsearch.common.regex.Regex;
|
|
|
import org.elasticsearch.common.settings.Settings;
|
|
|
import org.elasticsearch.index.Index;
|
|
@@ -58,8 +56,6 @@ public class IndexNameExpressionResolver extends AbstractComponent {
|
|
|
|
|
|
private final List<ExpressionResolver> expressionResolvers;
|
|
|
private final DateMathExpressionResolver dateMathExpressionResolver;
|
|
|
- private static final DeprecationLogger DEPRECATION_LOGGER =
|
|
|
- new DeprecationLogger(Loggers.getLogger(IndexNameExpressionResolver.class));
|
|
|
|
|
|
public IndexNameExpressionResolver(Settings settings) {
|
|
|
super(settings);
|
|
@@ -592,7 +588,6 @@ public class IndexNameExpressionResolver extends AbstractComponent {
|
|
|
private Set<String> innerResolve(Context context, List<String> expressions, IndicesOptions options, MetaData metaData) {
|
|
|
Set<String> result = null;
|
|
|
boolean wildcardSeen = false;
|
|
|
- boolean plusSeen = false;
|
|
|
for (int i = 0; i < expressions.size(); i++) {
|
|
|
String expression = expressions.get(i);
|
|
|
if (aliasOrIndexExists(metaData, expression)) {
|
|
@@ -605,14 +600,7 @@ public class IndexNameExpressionResolver extends AbstractComponent {
|
|
|
throw infe(expression);
|
|
|
}
|
|
|
boolean add = true;
|
|
|
- if (expression.charAt(0) == '+') {
|
|
|
- // if its the first, add empty result set
|
|
|
- plusSeen = true;
|
|
|
- if (i == 0) {
|
|
|
- result = new HashSet<>();
|
|
|
- }
|
|
|
- expression = expression.substring(1);
|
|
|
- } else if (expression.charAt(0) == '-') {
|
|
|
+ if (expression.charAt(0) == '-') {
|
|
|
// if there is a negation without a wildcard being previously seen, add it verbatim,
|
|
|
// otherwise return the expression
|
|
|
if (wildcardSeen) {
|
|
@@ -655,9 +643,6 @@ public class IndexNameExpressionResolver extends AbstractComponent {
|
|
|
wildcardSeen = true;
|
|
|
}
|
|
|
}
|
|
|
- if (plusSeen) {
|
|
|
- DEPRECATION_LOGGER.deprecated("support for '+' as part of index expressions is deprecated");
|
|
|
- }
|
|
|
return result;
|
|
|
}
|
|
|
|