# Elastic Search Fehlerbehebung

**URL:** https://forum.shopware.com/t/elastic-search-fehlerbehebung/64310
**Category:** Administration
**Created:** [28. Januar 2020 um 15:17 UTC](https://forum.shopware.com/t/elastic-search-fehlerbehebung/64310 "2020-01-28T15:17:07Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)
#### Post date: [28. Januar 2020 um 15:17 UTC](https://forum.shopware.com/t/elastic-search-fehlerbehebung/64310/1 "2020-01-28T15:17:07Z")

</div>

Hi, ich nutze ElasticSearch und wenn ich&nbsp;

```
bin/console sw:es:index:populate

```

durchführe bekomme ich folgendes Ergebnis:

```
## Indexing shop Demoshop ##
Indexing properties
 90/90 [============================] 100% 1 sec/1 sec

 Evaluation:
  Total: 309 items
  Error: 0 items
  Success: 89 items

Indexing products
 9116/9116 [============================] 100% 11 secs/11 secs

 Evaluation:
  Total: 9116 items
  Error: 7 items
  Success: 9109 items

```

Meine Frage, Was passiert bei indexing properties und indexing products genau? Und wie kann man die 7 Errors beseitigen?&nbsp;

In&nbsp; es\_production-2020-01-28.log steht folgendes auszugweise:

```
{"index":{"_index":"sw_shop1_product_20200128160047","_type":"product","_id":"10011185","_version":1,"result":"created","_shards":{"total":1,"successful":1,"failed":0},"_seq_no":8665,"_primary_term":1,"status":201}},

```

oder (der Artikel ist in der Datenbank richtig datiert, aber im Backend wird er falsch angezeigt:

```
{"index":{"_index":"sw_shop1_product_20200128160047","_type":"product","_id":"10011223","status":400,"error":{"type":"mapper_parsing_exception","reason":"failed to parse field [formattedReleaseDate] of type [date] in document with id '10011223'. Preview of field's value: '-0001-11-30'","caused_by":{"type":"illegal_argument_exception","reason":"failed to parse date field [-0001-11-30] with format [yyyy-MM-dd]","caused_by":{"type":"date_time_parse_exception","reason":"Text '-0001-11-30' could not be parsed: Invalid value for YearOfEra (valid values 1 - 999999999/1000000000): -1","caused_by":{"type":"date_time_exception","reason":"Invalid value for YearOfEra (valid values 1 - 999999999/1000000000): -1"}}}}}},

```

oder:

```
{"index":{"_id":"10011188"}},"[object] (Shopware\\Bundle\\ESIndexingBundle\\Struct\\Product: {\"formattedCreatedAt\":\"2020-01-24\",\"formattedUpdatedAt\":\"2020-01-24\",\"formattedReleaseDate\":null,\"properties\":[{\"id\":6415,\"name\":\"3+\",\"media\":null,\"position\":0,\"attributes\":[]},{\"id\":6479,\"name\":\"32\",\"media\":null,\"position\":0,\"attributes\":[]}],\"categoryIds\":[\"12\",\"3\",\"57\"],\"calculatedPrices\":{\"EK_1\":{\"calculatedPrice\":126.95,\"calculatedReferencePrice\":null,\"calculatedPseudoPrice\":0,\"rule\":null,\"attributes\":[]},\"H_1\":{\"calculatedPrice\":126.95,\"calculatedReferencePrice\":null,\"calculatedPseudoPrice\":0,\"rule\":null,\"attributes\":[]}},\"configuration\":[],\"visibility\":[],\"availability\":[],\"availableCombinations\":null,\"listingVariationPrices\":[],\"filterConfiguration\":[],\"manualSorting\":[],\"name\":\"XXXXXXXXXXXXX Grosses Set\",\"stock\":0,\"shortDescription\":\"\",\"longDescription\":\"XXXXXXXXXXXXX\",\"shippingTime\":null,\"shippingFree\":false,\"closeouts\":false,\"hasProperties\":true,\"createdAt\":null,\"updatedAt\":null,\"keywords\":\"\",\"metaTitle\":\"\",\"allowsNotification\":false,\"additional\":\"\",\"minStock\":0,\"height\":0,\"width\":0,\"length\":0,\"weight\":0,\"ean\":\"XXXXXXXXXXXXX\",\"highlight\":false,\"sales\":0,\"hasConfigurator\":false,\"hasEsd\":false,\"isPriceGroupActive\":false,\"blockedCustomerGroupIds\":[],\"manufacturerNumber\":\"53.033.887\",\"template\":\"\",\"cheapestPriceRule\":null,\"cheapestUnitPrice\":null,\"unit\":{\"id\":null,\"name\":null,\"unit\":null,\"purchaseUnit\":null,\"referenceUnit\":null,\"packUnit\":\"\",\"minPurchase\":1,\"maxPurchase\":null,\"purchaseStep\":null,\"attributes\":[]},\"tax\":{\"id\":5,\"name\":\"7,7\",\"tax\":7.7,\"attributes\":[]},\"manufacturer\":{\"id\":78,\"name\":\"BRIO\",\"description\":null,\"metaTitle\":null,\"metaDescription\":null,\"metaKeywords\":null,\"link\":\"\",\"coverFile\":null,\"coverId\":null,\"coverMedia\":null,\"attributes\":[]},\"priceGroup\":null,\"states\":[],\"esd\":null,\"voteAverage\":null,\"hasAvailableVariant\":true,\"customerPriceCount\":\"1\",\"fallbackPriceCount\":\"1\",\"mainVariantId\":11222,\"isMainVariant\":true,\"categories\":[],\"listingPrice\":null,\"id\":11209,\"variantId\":11222,\"number\":\"10011188\",\"attributes\":{\"core\":{\"id\":\"11222\",\"articledetailsID\":\"11222\",\"attr1\":\"\",\"attr2\":\"\",\"attr3\":\"\",\"attr4\":\"\",\"attr5\":false,\"attr6\":\"\",\"attr7\":\"\",\"attr8\":\"\",\"attr9\":\"\",\"attr10\":\"\",\"attr11\":\"\",\"attr12\":\"\",\"attr13\":\"\",\"attr14\":\"\",\"attr15\":\"\",\"attr16\":\"\",\"attr17\":\"\",\"attr18\":\"\",\"attr19\":\"\",\"attr20\":\"\"}}})",

```

Was bedeutet das?&nbsp;

Danke und Gruss

---

<div class="post-metadata">

### Author: ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)
#### Post date: [29. Januar 2020 um 07:51 UTC](https://forum.shopware.com/t/elastic-search-fehlerbehebung/64310/2 "2020-01-29T07:51:51Z")

</div>

Ok, eben konnte ich mich auf **green** und **100%** hiefen.&nbsp;

- Das **releasedate** war nicht überall NULL. Bin mir sicher dass ich gestern ein UPDATE mehrmals rüberrennen lassen habe
- ES log geleert,
- alle shards gelöscht
- neu indiziert (sw:es:index:poopulate)

Der log füllt sich aber leider trotzdem. Und gleich mit **zwei shards** obwohl ich nur **einmal populate** gemacht habe?? Und das macht auch gleich zwei Einträge im log, die allerdings unterschiedlich sind?&nbsp;Bei dem ersten sind&nbsp; es 100 Einträge mit ein paar 201-Status&nbsp; und 6x 400-Status, bei dem anderen&nbsp; sind es auch 100 Einträge mit 201-Status und nur 1x 400-Status. die 400er sind wieder Datum-fehler.

```
failed to parse field [formattedReleaseDate] of type [date] in document with id '10011043'. Preview of field's value: '-0001-11-30'","caused_by":{"type":"illegal_argument_exception","reason":"failed to parse date field [-0001-11-30] with format [yyyy-MM-dd]

```

Hat jemand eine Idee was das alles bedeutet?

Danke und Gruss

---

<div class="post-metadata">

### Author: ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)
#### Post date: [29. Januar 2020 um 07:58 UTC](https://forum.shopware.com/t/elastic-search-fehlerbehebung/64310/3 "2020-01-29T07:58:52Z")

</div>

Kann dass sein, dass mehrere Einträge mit den Wert “0000-00-00” hast?

&nbsp;

---

<div class="post-metadata">

### Author: ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)
#### Post date: [29. Januar 2020 um 08:27 UTC](https://forum.shopware.com/t/elastic-search-fehlerbehebung/64310/4 "2020-01-29T08:27:39Z")

</div>

Du hast mich auf eine Idee gebracht, ich habe CURRENT\_TIMESTAMP über datum rüberlaufen lassen, jetzt habe ich mal CURRENT\_DATE genommen. und auch bei dem releasedate habe ich nochmal NULL gemacht. Dort findet er immer wieder ein paar Einträge die nicht NULL sind. Es arbeiten drei personen im Backend. Kann es sein, dass wenn einer der anderen einen Artikel speichert, dass ggf das Datum vermurkst wird auch wenn man daran nichts editiert hat?

---

<div class="post-metadata">

### Author: ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)
#### Post date: [30. Januar 2020 um 14:10 UTC](https://forum.shopware.com/t/elastic-search-fehlerbehebung/64310/5 "2020-01-30T14:10:44Z")

</div>

Muss man denn die Shards immer löschen? Also wenn ich populate mache, dann legt er ja einen neuen shard an. “Verbindet” der sich dann mit dem alten Shard, also wenn im alten ein Fehler ist, dann erstellt er ein paralleles neues und bezieht das alte mit ein? Verständnisfrage.

Danke und Gruss
