return id
Closed this issue · 5 comments
hanzx commented
Hello Florian,
I have a id error in solr result.... in solr is id = '0003394-40_10' and result id is '10', 0003394-52_200 is 200,,,,,0003681-181 > is okey.... a char _ splits id value ...
Is it bug ? thanks
floriansemm commented
What?! Can you give me some more information? The data of your Entity would be nice.
hanzx commented
"id": "0003115-2231_S",
"m": "",
"p": "ALPINE PRO Pánská lyžařská bunda Cait 2 černá Velikost: S",
"p2": "ALPINE PRO Pánská lyžařská bunda Cait 2 černá Velikost: S",
"e": "",
"i": "",
"pn": "",
"u": "https://www.blizzworld.cz/panske-zimni-bundy/cait2-cerna/?variantId=11150",
"iu": "https://cdn.myshoptet.com/usr/www.blizzworld.cz/user/shop/orig/2231.jpg?57c722ba",
"vu": "",
"d": "",
return id = S
"id": "0003394-40_101",
"m": "",
"p": "ALBEDO100 REFLEXNÍ SPREJ NA TEXTIL - INVISIBLE BRIGHT Objem: 100 ml",
"p2": "ALBEDO100 REFLEXNÍ SPREJ NA TEXTIL - INVISIBLE BRIGHT Objem: 100 ml",
"e": "7350068060045",
"i": "",
"pn": "",
"u": "http://www.reflexnisprej.cz/reflexni-spreje/albedo100-reflexni-sprej-na-textil-invisible-bright/?variantId=64",
"iu": "https://cdn.myshoptet.com/usr/www.reflexnisprej.cz/user/shop/orig/40.jpg?57b36522",
"vu": "https://www.youtube.com/?v=WKQs09-b_wM",
"d": "",
"de": "0",
"dei": 0,
"pr": 445,
"pv": 445,
"spr": 0,
"sfr": "",
"sto": "",
return id = 101
it is all what i know,
floriansemm commented
The reason is how the bundle generates the document-id for entities:
$this->documentName . '_' . $this->getEntityId();
This creates something like post_1234
. This means when hydrating from index everything before the first _
will be removed. This explains why your id 0003115-2231_S
is cut down to S
.
floriansemm commented
hanzx commented
yes, it is okey - thanks