What happened to multifield from 0.9 -> 1.0?


(Justin Treher) #1

Apparently I have left a serious bug in my searches. We upgraded from 0.9
to 1.0.1 some time ago.

I changed all the multi_fields to the new format, where I put "type" :
"string" instead of "multi_field." As documented here:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/_multi_fields.html

Now they look like this

"bag_holder":{
"type":"string"
, "path" : "just_name"
, "fields":{
"bag_holder" : {"type":"string", "analyzer":"custom"}
,"bag_holder_booster" : {"type":"string", "analyzer":"keyword_booster"}
}
}

However, I kept the "path" : "just_name" and left my other fields as they
were according the to information provided in the link above. The problem,
as with the example above, is that my "field with the same name as
property" must now be accessed in the query as item.item rather than just
item as before. So, what's happening is that my queries are running the
default analyzers for "item" by itself. Is there better documentation for
converting? I want to verify that the only fix I need here is just to move
all the attributes out of the "same name" field and put them directly under
the property. Anything additional will just remain in the fields area.

The Fix ??

"bag_holder":{
"type":"string"
, "path" : "just_name" (I know this is "optional" and deprecated")
, "analyzer":"custom"
, "fields":{
"bag_holder_booster" : {"type":"string", "analyzer":"keyword_booster"}
}
}

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/dd8d8126-a3bf-4619-871a-f71912aab211%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #2