|
@@ -18,7 +18,6 @@ import org.elasticsearch.dissect.DissectParser;
|
|
|
import org.elasticsearch.index.IndexMode;
|
|
|
import org.elasticsearch.transport.RemoteClusterAware;
|
|
|
import org.elasticsearch.xpack.esql.VerificationException;
|
|
|
-import org.elasticsearch.xpack.esql.action.EsqlCapabilities;
|
|
|
import org.elasticsearch.xpack.esql.common.Failure;
|
|
|
import org.elasticsearch.xpack.esql.core.expression.Alias;
|
|
|
import org.elasticsearch.xpack.esql.core.expression.Attribute;
|
|
@@ -280,8 +279,7 @@ public class LogicalPlanBuilder extends ExpressionBuilder {
|
|
|
for (var c : metadataOptionContext.UNQUOTED_SOURCE()) {
|
|
|
String id = c.getText();
|
|
|
Source src = source(c);
|
|
|
- if (MetadataAttribute.isSupported(id) == false // TODO: drop check below once METADATA_SCORE is no longer snapshot-only
|
|
|
- || (EsqlCapabilities.Cap.METADATA_SCORE.isEnabled() == false && MetadataAttribute.SCORE.equals(id))) {
|
|
|
+ if (MetadataAttribute.isSupported(id) == false) {
|
|
|
throw new ParsingException(src, "unsupported metadata field [" + id + "]");
|
|
|
}
|
|
|
Attribute a = metadataMap.put(id, MetadataAttribute.create(src, id));
|