I'm indexing documents with nested objects where some of the objects
include unique ids (GUIDS). I want all such fields to be "not_analyzed."
The id fields always have an '_id' suffix however, these fields can appear
at arbitrary levels in the document hierarchy. I'm trying to come up with a
dynamic mapping template to address this so that any field of the form
"_id" regardless of the nesting depth will be marked as "not_analyzed." I
don't think there's a way to specify this as a single patch_match, but I
just wanted to confirm that I'm not missing something. In practice, I
suppose the nesting will never go deeper than let's say, 5. So I could
define 5 path_match patterns like _id, ._id, .._id...etc. Although
experience shows that the moment I do this, we'll find the need to go to 6
levels ;-). Ideally, you'd be able to specify a path in ANT-like syntax
e.g., **/_id. Maybe I'll write up an enhancement request for this.
On Friday, April 3, 2015 at 10:36:00 AM UTC-4, Brian Levine wrote:
I'm indexing documents with nested objects where some of the objects
include unique ids (GUIDS). I want all such fields to be "not_analyzed."
The id fields always have an '_id' suffix however, these fields can appear
at arbitrary levels in the document hierarchy. I'm trying to come up with a
dynamic mapping template to address this so that any field of the form
"_id" regardless of the nesting depth will be marked as "not_analyzed." I
don't think there's a way to specify this as a single patch_match, but I
just wanted to confirm that I'm not missing something. In practice, I
suppose the nesting will never go deeper than let's say, 5. So I could
define 5 path_match patterns like _id, ._id, .._id...etc. Although
experience shows that the moment I do this, we'll find the need to go to 6
levels ;-). Ideally, you'd be able to specify a path in ANT-like syntax
e.g., **/_id. Maybe I'll write up an enhancement request for this.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.