If it helps, here are my index settings and mappings. Note that I chose the 
name text.na as the non-analyzed form, not text.raw. Perhaps I should 
follow convention? But for now, a rose by any other name is still not 
analyzed:

{
  "settings" : {
    "index" : {
      "number_of_shards" : 1,
      "refresh_interval" : "1s",
      "analysis" : {
        "char_filter" : { },
        "filter" : {
          "english_snowball_filter" : {
            "type" : "snowball",
            "language" : "English"
          }
        },
        "analyzer" : {
          "english_stemming_analyzer" : {
            "type" : "custom",
            "tokenizer" : "standard",
            "filter" : [ "standard", "lowercase", "asciifolding", 
"english_snowball_filter" ]
          },
          "english_standard_analyzer" : {
            "type" : "custom",
            "tokenizer" : "standard",
            "filter" : [ "standard", "lowercase", "asciifolding" ]
          }
        }
      }
    }
  },
  "mappings" : {
    "_default_" : {
      "dynamic" : "strict"
    },
    "ghost" : {
      "_all" : {
        "enabled" : false
      },
      "_ttl" : {
        "enabled" : true,
        "default" : "1.9m"
      },
      "properties" : {
        "cn" : {
          "type" : "string",
          "analyzer" : "english_stemming_analyzer"
        },
        "text" : {
          "type" : "multi_field",
          "fields" : {
            "text" : {
              "type" : "string",
              "analyzer" : "english_stemming_analyzer",
              "position_offset_gap" : 4
            },
            "std" : {
              "type" : "string",
              "analyzer" : "english_standard_analyzer",
              "position_offset_gap" : 4
            },
            "na" : {
              "type" : "string",
              "index" : "not_analyzed"
            }
          }
        }
      }
    },
    "*elf*" : {
      "_all" : {
        "enabled" : false
      },
      "_ttl" : {
        "enabled" : true
      },
      "properties" : {
        "cn" : {
          "type" : "string",
          "analyzer" : "english_stemming_analyzer"
        },
        "*text*" : {
          "type" : "multi_field",
          "fields" : {
            "text" : {
              "type" : "string",
              "analyzer" : "english_stemming_analyzer",
              "position_offset_gap" : 4
            },
            "std" : {
              "type" : "string",
              "analyzer" : "english_standard_analyzer",
              "position_offset_gap" : 4
            },
            "*na*" : {
              "type" : "string",
              "index" : "*not_analyzed*"
            }
          }
        }
      }
    }
  }
}


Brian

On Thursday, January 9, 2014 10:38:15 PM UTC-5, Jun Ohtani wrote:
>
> Hi Chris, 
>
> I recreate your issue to the following gist. 
>
> https://gist.github.com/johtani/8346404 
>
> And I try to change  query as follows: 
>
> User_Name.raw:bob.smith-jones -> matches 
> User_Name.raw:bob.smi* -> matches 
> User_Name.raw:bob.smith-j* -> matches 
> User_Name.raw:bob.smith\-j* -> matches 
>
> I use User_Name.raw field instead of User_Name. 
>
> Sorry, not necessary to escape… 
>
> And I don’t know why do not work Brian example’s query_string query… 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/b0aece84-052c-4efc-8a25-1b42850fefe4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to