Index "not_analyzed" for fields with type "object"


(Andrew Degtiariov) #1

Is there possible to specify "index": "not_analyzed" for fields with
type "object"?
In mapping for document I want to include full object for omitting
database queries:
{
"contact": {
"properties" : {
"serialized_object": {
"type": "object",
"index": "not_analyzed",
"store": "yes"
}
}
}

But when I requested mapping for the document from index I see then
all fields in "serialized_object" is in index "analyzed":
{
.....

          "serialized_object" : {
               "date_formats" : [
                  "dateOptionalTime", "yyyy/MM/dd HH:mm:ss||yyyy/MM/dd"
                ],
              "dynamic" : true,
              "enabled" : true,
              "path" : "full",
              "properties" : {
                      "account_id" : {
                         "boost" : 1.0,
                         "index" : "analyzed",
                         "index_name" : "account_id",
                         "omit_norms" : false,
                         "omit_term_freq_and_positions" : false,
                         "store" : "no",
                         "term_vector" : "no",
                         "type" : "string"
                    },

                    .....
              },
    ...

}

Andrew Degtiariov
DA-RIPE


(Shay Banon) #2

No, you will have to set the it for each field. There can be a feature, on
the object level, where each mapping created that has no mapping defined for
index (for example), then use the one defined on the object level.

-shay.banon

On Tue, Aug 31, 2010 at 6:13 PM, Andrew Degtiariov <
andrew.degtiariov@gmail.com> wrote:

Is there possible to specify "index": "not_analyzed" for fields with
type "object"?
In mapping for document I want to include full object for omitting
database queries:
{
"contact": {
"properties" : {
"serialized_object": {
"type": "object",
"index": "not_analyzed",
"store": "yes"
}
}
}

But when I requested mapping for the document from index I see then
all fields in "serialized_object" is in index "analyzed":
{
.....

         "serialized_object" : {
              "date_formats" : [
                 "dateOptionalTime", "yyyy/MM/dd HH:mm:ss||yyyy/MM/dd"
               ],
             "dynamic" : true,
             "enabled" : true,
             "path" : "full",
             "properties" : {
                     "account_id" : {
                        "boost" : 1.0,
                        "index" : "analyzed",
                        "index_name" : "account_id",
                        "omit_norms" : false,
                        "omit_term_freq_and_positions" : false,
                        "store" : "no",
                        "term_vector" : "no",
                        "type" : "string"
                   },

                   .....
             },
   ...

}

Andrew Degtiariov
DA-RIPE


(system) #3