Disabling analyzer for dynamically added fields

Hi there,

I have an index where the documents all look like this:

{
id:,
description:,
answer_:,
annotation_
:
}

The "answer_" fields are dynamically added, like "answer_isEnglish:yes" or
"answer_supportsTeam:Real Madrid". I want to do faceted searching on these,
so I need them to not be tokenized. How could I have the description field
analyzed and searchable as normal, and none of the "answer_
" fields
analyzed?

Cheers,
Dave

--
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.

Does the following mapping helps you? Replace "soccer" -> "your entity"

{
"soccer": {
"dynamic_templates": [
{
"store_generic": {
"match": "answer_*",
"mapping": {
"index": "not_analyzed",
"store": "yes",
"omit_norms": "false",
"index_options": "positions"
}
}
}
]
}
}

Am Donnerstag, 20. Juni 2013 12:40:21 UTC+2 schrieb David Milne:

Hi there,

I have an index where the documents all look like this:

{
id:,
description:,
answer_:,
annotation_
:
}

The "answer_" fields are dynamically added, like "answer_isEnglish:yes"
or "answer_supportsTeam:Real Madrid". I want to do faceted searching on
these, so I need them to not be tokenized. How could I have the description
field analyzed and searchable as normal, and none of the "answer_
" fields
analyzed?

Cheers,
Dave

--
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.

You have to install the dynamic mapping before indexing content to the
answer-fields. You can use something like the following mapping.
Replace "soccer" with "your entity".

{
"soccer": {
"dynamic_templates": [
{
"store_generic": {
"match": "answer_*",
"mapping": {
"index": "not_analyzed",
"store": "yes",
"omit_norms": "false",
"index_options": "positions"
}
}
}
]
}
}

Am Donnerstag, 20. Juni 2013 12:40:21 UTC+2 schrieb David Milne:

Hi there,

I have an index where the documents all look like this:

{
id:,
description:,
answer_:,
annotation_
:
}

The "answer_" fields are dynamically added, like "answer_isEnglish:yes"
or "answer_supportsTeam:Real Madrid". I want to do faceted searching on
these, so I need them to not be tokenized. How could I have the description
field analyzed and searchable as normal, and none of the "answer_
" fields
analyzed?

Cheers,
Dave

--
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.

Perfect, Thank You!

On Friday, June 21, 2013 6:43:10 AM UTC+10, cthoma wrote:

You have to install the dynamic mapping before indexing content to the
answer-fields. You can use something like the following mapping.
Replace "soccer" with "your entity".

{
"soccer": {
"dynamic_templates": [
{
"store_generic": {
"match": "answer_*",
"mapping": {
"index": "not_analyzed",
"store": "yes",
"omit_norms": "false",
"index_options": "positions"
}
}
}
]
}
}

Am Donnerstag, 20. Juni 2013 12:40:21 UTC+2 schrieb David Milne:

Hi there,

I have an index where the documents all look like this:

{
id:,
description:,
answer_:,
annotation_
:
}

The "answer_" fields are dynamically added, like "answer_isEnglish:yes"
or "answer_supportsTeam:Real Madrid". I want to do faceted searching on
these, so I need them to not be tokenized. How could I have the description
field analyzed and searchable as normal, and none of the "answer_
" fields
analyzed?

Cheers,
Dave

--
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.