I have a search index (for a b2b webshop) with about 200,000 products. For each product, the customer number of the product is stored per customer in a key-value array (key = customer number, value = article number).
Below an example of an item in my search index
{
"id": 45782,
"sku": "12.34.56",
"title": {
"nl": "Accu 12V 230Ah Bosch semitractie"
},
"brand_id": 184,
"brand_name": "bosch",
"customer_references": {
"101028": "ABC-123",
"101029": "DDD-34433",
"101030": "4-243345",
"101031": "4-33333",
},
"category_ids": [
5100,
5091,
5070,
5000
]
}
I have added all these fields to the “searchableAttributes” setting of the index and now I want to indicate per query in which fields can be searched using the restrictSearchableAttributes parameter (because I only want to search in the field corresponding with the customer number of the logged in user). This works fine if I don’t have more than 64 searchable attributes, but in my case I have hundreds of different customer numbers. It still works fine if I add one of the first 64 searchable attributes to the restrictSearchableAttributes parameter, but when I add searchable attribute number 65 or higher to the restrictSearchableAttributes parameter I get no results at all. Anyone an idea how I can fix this?