Elastic 1.7 multi_field/copy_to question


(Matt Chambers) #1

Hello,

I'm having this issue with multi_field, not sure if I'm setting up the mapping right.I've changed the standard allayer to an edgeNGram with delimiter/standard/lowercase/stop filers.

I'm storing a full file path like /foo/bar/beer_kettle_01.jpg in the path field and it gets copy_to to a keywords.level5 field.

      "properties": {
        "path": {
          "type": "string",
          "index" : "analyzed",
          "copy_to": "keywords.level5",
          "fields": {
            "raw": {
              "type": "string",
              "index": "not_analyzed"
            }

Keywords field.

    "keywords": {
      "properties": {
        "level5": {
          "type": "string",
          "index" : "analyzed",
          "fields": {
            "raw": {
              "type": "string",
              "index": "not_analyzed"
            }
          },

If I test the analyzer on my path, I clearly see "beer" is a word that is generated. However, if I do a query string search on keywords.level5 for "beer" I get no result. However, I do get a result from "beer_kettle_01.jpg"...so something is getting in there.

What I'm I doing wrong?


(system) #2