0

I have nested child in the following format:

"product" : {
   "skus" : [{"bestbuy.com" : "bsku123"},
             {"otherretail.com" : "somerandomsku111"},
             {"somesite.com" : "48043s"}]
}

since the source site / sku combination is a free form format, the importer constantly breaks after importing N number of records with the error message saying something similar to this:

nested: ElasticSearchParseException[failed to parse date field [48043s], 
tried both date format [dateOptionalTime], and timestamp number]; nested:
IllegalArgumentException[Invalid format: \"48043s\" is malformed at \"s\"]

clearly it happenning because one of the records may have a sku added in the date format which forced that particular vendor to automap it's value to a date format

How do I overwrite this auto-date mapping format for all skus.* named key/value pairs? or is there a better format to store all data that I require - Vendor + Vendor specific SKU?

I tried setting this in the mapping, but it didn't change a thing:

'skus.*' => array( 'index'  => 'not_analyzed',
                   'type'   => 'string' ),

any help would be greatly appreciated.

Alex Smirnov
  • 537
  • 1
  • 5
  • 12

1 Answers1

0

I think I just found the answer to my own question: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-root-object-type.html

similar question was answered here: Elasticsearch: is there a way to declare for all (possibly dynamic) subfields of an object field as string?

Community
  • 1
  • 1
Alex Smirnov
  • 537
  • 1
  • 5
  • 12