Skip to content

Allow analyzed fields to be returned in fields array #2691

@Downchuck

Description

@Downchuck

It seems we currently need to use facets to get the results of an analyzer on a non-stored index.

For example, on a single record, this will return the results of the analyzer:

curl localhost:9200/test/idx/_search?pretty -d '{"fields":["title"], "facets":{"terms":{"terms": {"field":"terms"}}}, "query": {"match_all":{}}}'

Via:
{
"_source": { "enabled": false },
"properties" : {
"terms" : { "type" : "string", "analyzer": "camel", store: "no" },
"folder" : { "type" : "string", store: "yes" },
"title" : { "type" : "string", store: "yes" }
}
}

Analyzer/tokenizers are lossy, that's the point, but it'd be nice to be able to pull the results from records more naturally, with something such as:

curl localhost:9200/test/idx/_search?pretty -d '{"fields":["title","_analyzer.terms"], "query": {"match_all":{}}}'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions