Skip to content

ESQL: disallow unmapped_fields="load" with full-text search/MATCH #141927

@alex-spies

Description

@alex-spies

While it's logical that we cannot run a full-text search on an unmapped field, maybe we should fail queries with unmapped_fields="load" rather than just returning an empty set.

To repro, unmap the version field (of type version) from the apps index

{
    "dynamic" :  false,
    "properties" : {
        "id" : {
            "type" : "integer"
        },
        "name" : {
            "type" : "keyword"
        }
    }
}

and run this altered version of match-operator.testMatchVersionFieldAsString:

testMatchVersionFieldAsString
required_capability: match_operator_colon
required_capability: match_additional_types

SET unmapped_fields="load";
from apps 
| where version:"2.1" 
| keep name, version;

name:keyword | version:keyword
bbbbb        | 2.1
;


Expected more data but no more entries found after [0]
Data mismatch:

Actual:
name:keyword | version:keyword

Expected:
name:keyword | version:keyword
bbbbb   

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions