You only specified your analyzer on the _all field, and not all the other
fields (title, content). If you want it to apply to all (string) fields,
you can simply name it "default".
On Thu, May 10, 2012 at 1:03 PM, Filip filip.neven@gmail.com wrote:
Hi,
I'm using a custom Lucene analyzer, made available through a plugin.
In my index mapping file, I specified this analyzer using:{
"article" : {
"_all" : {
"indexAnalyzer" : "foo_analyzer",
"searchAnalyzer" : "foo_analyzer"
}
"properties" : {
"title" : {
"type" : "string",
"index" : "analyzed"
}
"content" : {
"type" : "string",
"index" : "analyzed"
}
...
}It turns out that the analyzer is used properly when searching over
the entire article, e.g.
http://localhost:9200/development_articles/_search?q=foo-barBut the analyzer is not used when I search on a specific property, it
seems to use the default analyzer:
http://localhost:9200/development_articles/_search?q=someproperty:foo-barThe goal of this analyzer is to make sure words concatenated with a
hyphen (foo-bar) are considered one word, and that the query doesn't
match on one part of the word only (foo or bar separately)Any idea?