(Second attempt to post this: Chrome is garbage and lost the first attempt.)
Here are my settings and mappings:
{
"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" : {
"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"
}
}
}
}
}
}
}
Here is a query to the text field:
{
"bool" : {
"must" : {
"match" : {
"text" : {
"query" : "lives",
"type" : "boolean"
}
}
}
}
}
Here is a query to the text.na field which is not_analyzed:
{
"bool" : {
"must" : {
"match" : {
"text.na" : {
"query" : "Lives forever",
"type" : "boolean"
}
}
}
}
}
And here are the two documents that are returned from each of the above
queries:
On Monday, September 30, 2013 12:50:01 PM UTC-4, Paul Sanwald wrote:
Hi Brian,
the subfield is actually named with the underscore, although you are
right, I should have included the prefix. Alas, I tried it again with
"match" : {
"activeLabels.activeLabels_not_analyzed" : {
"query" : "test1",
"type" : "boolean",
"operator" : "OR"
}
and still no dice :(.
On Monday, September 30, 2013 11:32:25 AM UTC-4, InquiringMind wrote:
Maybe try:
"activeLabels*.*not_analyzed"
"activeLabels_not_analyzed" : {
Am I missing something about the way not analyzed fields are used vs
analyzed?
In other words, the dot and not the underscore is the field name scoping
"operator".
Hope this helps!
Brian
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.