Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning messages logged when index_prefixes are configured in index mapping #77183

Closed
R0ky opened this issue Sep 2, 2021 · 4 comments · Fixed by #77234
Closed

Warning messages logged when index_prefixes are configured in index mapping #77183

R0ky opened this issue Sep 2, 2021 · 4 comments · Fixed by #77234
Assignees
Labels
>bug :Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch

Comments

@R0ky
Copy link

R0ky commented Sep 2, 2021

Elasticsearch version (bin/elasticsearch --version): 7.11.0

Plugins installed: []

JVM version (java -version):

OS version (uname -a if on a Unix-like system):

Description of the problem including expected versus actual behavior:
For index that has index_prefixes configured in the mapping, so similar like this:

"field" : {
          "type" : "text",
          "index_prefixes" : {
            "min_chars" : 1,
            "max_chars" : 17
          }
        },

we can see a number of warning events logged in Elasticsearch log. Events look like this:

[index_name][10] no index mapper found for field: [field._index_prefix] returning default postings format

Steps to reproduce:

N/A

Provide logs (if relevant):
N/A

@R0ky R0ky added >bug needs:triage Requires assignment of a team area label labels Sep 2, 2021
@pugnascotia
Copy link
Contributor

@romseygeek given the Slack conversation, do I need to do anything here? I'm not clear who was going to raise the ES issue.

@romseygeek romseygeek self-assigned this Sep 2, 2021
@romseygeek romseygeek added :Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. :Search Foundations/Mapping Index mappings, including merging and defining field types labels Sep 2, 2021
@elasticmachine elasticmachine added Team:Search Meta label for search team Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. labels Sep 2, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@romseygeek romseygeek removed Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. Team:Search Meta label for search team needs:triage Requires assignment of a team area label labels Sep 2, 2021
@romseygeek
Copy link
Contributor

@pugnascotia I'll take this one.

romseygeek added a commit that referenced this issue Sep 3, 2021
…77234)

Currently we configure per-field postings formats by asking the MapperService
for the MappedFieldType of the field in question, and then checking to see if it
is a completion field. If no MappedFieldType is available, we emit a warning.
However, MappedFieldTypes are for search fields only, and so we end up emitting
warnings for hidden sub-fields that have no corresponding field type, such as
prefix or phrase accelerator fields on text mappers.

This commit reworks things so that the MappingLookup is responsible for defining
per-field postings formats, and will detect CompletionFieldMappers at build time.
All fields that are not mapped to a completion field will just get the default postings
format. This also means that we no longer need a logger instance on CodecService.

Fixes #77183
romseygeek added a commit that referenced this issue Sep 3, 2021
…77234)

Currently we configure per-field postings formats by asking the MapperService
for the MappedFieldType of the field in question, and then checking to see if it
is a completion field. If no MappedFieldType is available, we emit a warning.
However, MappedFieldTypes are for search fields only, and so we end up emitting
warnings for hidden sub-fields that have no corresponding field type, such as
prefix or phrase accelerator fields on text mappers.

This commit reworks things so that the MappingLookup is responsible for defining
per-field postings formats, and will detect CompletionFieldMappers at build time.
All fields that are not mapped to a completion field will just get the default postings
format. This also means that we no longer need a logger instance on CodecService.

Fixes #77183
romseygeek added a commit that referenced this issue Sep 3, 2021
…77234)

Currently we configure per-field postings formats by asking the MapperService
for the MappedFieldType of the field in question, and then checking to see if it
is a completion field. If no MappedFieldType is available, we emit a warning.
However, MappedFieldTypes are for search fields only, and so we end up emitting
warnings for hidden sub-fields that have no corresponding field type, such as
prefix or phrase accelerator fields on text mappers.

This commit reworks things so that the MappingLookup is responsible for defining
per-field postings formats, and will detect CompletionFieldMappers at build time.
All fields that are not mapped to a completion field will just get the default postings
format. This also means that we no longer need a logger instance on CodecService.

Fixes #77183
@javanna javanna added the Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants