Kibana 5.1.2 dont make searchable keywords fields

Hi,

I have in issue with kibana. So, when created mapping with keywords - which is by default not_analyzed
it's not showing in kibana.

Please see below:

{
  "affiliate-mapped-data-20170105": {
    "mappings": {
      "external": {
        "dynamic_templates": [
          {
            "strings": {
              "match_mapping_type": "string",
              "mapping": {
                "index": "not_analyzed",
                "type": "string"
              }
            }
          }
        ],
        "properties": {
          "AffiliateColor": {
            "type": "keyword"
          },
          "AffiliateNetwork": {
            "type": "text"
          },
          "BrandName": {
            "type": "keyword"
          },
          "ColorHexCode": {
            "type": "keyword"
          },
          "ColorName": {
            "type": "keyword"
          },
          "Country": {
            "type": "keyword"
          },
          "Currency": {
            "type": "keyword"
          },
          "DateOfImport": {
            "type": "date",
            "format": "strict_date_optional_time"
          },
          "Description": {
            "type": "keyword",
            "index": false
          },
          "GarmentType": {
            "type": "keyword"
          },
          "GarmentTypeId": {
            "type": "keyword"
          },
          "Gender": {
            "type": "keyword"
          },
          "IsAccessoryItem": {
            "type": "long"
          },
          "IsOnSale": {
            "type": "boolean"
          },
          "Keywords": {
            "type": "keyword"
          },
          "Price": {
            "type": "float"
          },
          "ProductImageUrl": {
            "type": "keyword"
          },
          "ProductName": {
            "type": "keyword"
          },
          "ProductPageUrl": {
            "type": "text"
          },
          "ProductType": {
            "type": "keyword"
          },
          "RegionSize": {
            "type": "keyword"
          },
          "Shop": {
            "type": "keyword"
          },
          "Size": {
            "type": "keyword"
          }
        }
      }
    }
  }
}

Hi Alexandr,

Did you try without any mapping? I just loaded 1 test doc below without defining any mapping and here's what I got;

curl -XPUT 'http://elastic:changeme@localhost:9200/aa-bb-2016-09/test/1' -d '{
    "date" : "2015-08-23T00:01:00",
    "action" : "start",
    "myid" : 1,
    "words" : "these are words right here"
}'

Notice that the default behavior was to create a .keyword field for action and words string fields.

If I look at the mapping with http://localhost:9200/aa-bb-2016-09/_mapping I get this;

{
  "aa-bb-2016-09" : {
    "mappings" : {
      "test" : {
        "properties" : {
          "action" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "date" : {
            "type" : "date"
          },
          "myid" : {
            "type" : "long"
          },
          "words" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          }
        }
      }
    }
  }
}

I'm not an expert on Elasticsearch mappings, but hopefully this example helps you.

Regards,
Lee

Well, may be it works... But my question was my mappings is not displayed as expected!
Default behaviour is not accepted here.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.