WARNING: no index mapper found for field: [foo.bar] returning default postings format

Hi.

Problem

I got following WARNING.

no index mapper found for field: [xxxxxxx] returning default postings format

I don’t know what WARNING means.

Environment

  • OpenSearch 1.3.2
  • on docker compose

Reproduction

I am using python client.

from opensearchpy import OpenSearch
from opensearchpy.helpers import bulk
client = OpenSearch(hosts=[{"host": 'localhost', "port": '9200'}])

settings = {
  "mappings": {
    "dynamic_templates": [
      {
        "metadata": {
          "path_match": "metadata.*",
          "mapping": {
            "fields": {
              "keyword": {
                "ignore_above": 256,
                "type": "keyword"
              }
            },
            "type": "text"
          }
        }
      }
    ],
    "properties": {
      "metadata": {"type": "object"},
    }
  }
}

# make index
client.indices.create(index='test1', body=settings)
client.indices.create(index='test2', body=settings)

# index data
body = {
    'metadata': {
        'foo': ['foo'],
        'bar': [1, 2],
    }
}
client.index(index='test1', body=body, id='1')

body = {
    'metadata': {
    }
}
client.index(index='test2', body=body, id='2')

When I try to test2 index, I got following WARNING.
It seems unrelated to the test2 index.

[WARN ][o.o.i.s.IndexShard       ] [3a4e812aa707] [test2][0] no index mapper found for field: [metadata.foo] returning default postings format
[WARN ][o.o.i.s.IndexShard       ] [3a4e812aa707] [test2][0] no index mapper found for field: [metadata.foo.keyword] returning default postings format
[WARN ][o.o.i.s.IndexShard       ] [3a4e812aa707] [test2][0] no index mapper found for field: [metadata.bar] returning default postings format
[WARN ][o.o.i.s.IndexShard       ] [3a4e812aa707] [test2][0] no index mapper found for field: [metadata.bar.keyword] returning default postings format

It seems to occur when via Python Client…maybe :thinking:

Sorry, it seems settings.index.knn .