Custom Selector error unique 'id' property


#1

Enonic version: 6.15.5
OS: Windows

Hi guys,

We are having an intermittent problem with a custom selector:

We can confirm that our list of “id” is unique, and that error sometimes happen and sometimes not happens, did you have reported some bug like this?


#2

Hi, we had a similar complaint recently and the reason was that developer returned hits object inside of the hits object in the response body.

This is how response should be structured:

body = {
  total: number,
  count: number,
  hits: [{
   id: 1,
   displayName: ...,
   description: ....
  }, {
   id: 2,
   displayName: ...,
   description: ....
  }]
}

Can you verify response from the selector’s service? Post it here maybe.


#3

Hi Alan

Thats a piece of the return:

{
“hits”: [
{
“id”: “ICD10.Y906”,
“displayName”: “Y906 - Påvist alkoholmengde 120-199mg/100ml (1.20-1.99 promille)”,
“description”: “ICD10”
},
{
“id”: “ICD10.D519”,
“displayName”: “D519 - Uspesifisert anemi ved B12-vitaminmangel”,
“description”: “ICD10”
},
{
“id”: “ICD10.D518”,
“displayName”: “D518 - Annen anemi ved B12-vitaminmangel”,
“description”: “ICD10”
},
{
“id”: “ICD10.D513”,
“displayName”: “D513 - Annen diettbetinget anemi med B12-vitaminmangel”,
“description”: “ICD10”
},
{
“id”: “ICD10.D511”,
“displayName”: “D511 - Anemi ved B12-vitaminmangel som skyldes selektiv B12-malabsorpsjon med proteinuri”,
“description”: “ICD10”
},
{
“id”: “ICD10.D510”,
“displayName”: “D510 - Anemi ved B12-vitaminmangel som skyldes mangel på «intrinsic factor»”,
“description”: “ICD10”
},
{
“id”: “ICPC2.B81”,
“displayName”: “B81 - Anemi ved vitamin B12-/folsyremangel”,
“description”: “ICPC2”
}
],
“total”: 7,
“count”: 7
}

ps. all total data (without filter has around 20.000 itens)