Set analyzer for a field based on field's name specified by a regex?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Set analyzer for a field based on field's name specified by a regex?

shadyabhi
Hi all,

As the subject states, is that possible?

I'm sending json documents with various fields like a, b, c, fields.a,
fields.b, fields.c, d. I want to add a rule in template that sets all
fields starts with "fields." (or a regex as /fields\..*/ ) as not_analyzed.

Is that possible in elasticsearch as of now? Please note that "fields"
is just a field name and it's not a object. Thanks

--
Regards,
Abhijeet Rastogi (shadyabhi)

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Set analyzer for a field based on field's name specified by a regex?

Ivan Brusic
Look into dynamic templates. You can set the match_pattern to be regex.


Cheers,

Ivan


On Mon, Sep 30, 2013 at 5:12 AM, Abhijeet Rastogi <[hidden email]> wrote:
Hi all,

As the subject states, is that possible?

I'm sending json documents with various fields like a, b, c, fields.a,
fields.b, fields.c, d. I want to add a rule in template that sets all
fields starts with "fields." (or a regex as /fields\..*/ ) as not_analyzed.

Is that possible in elasticsearch as of now? Please note that "fields"
is just a field name and it's not a object. Thanks

--
Regards,
Abhijeet Rastogi (shadyabhi)

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.