Ivan Bacher
03/22/2023, 10:33 AMfacet_by
returns a facet that is just an empty string for me. E.g.
const testSchema = {
name: 'test',
enable_nested_fields: true,
fields: [
{ name: 'id', type: 'string' },
{ name: 'category', type: 'string', facet: true, optional: true },
...
]
}
const testEntries = [
{ id: 1, category: '' },
{ id: 2, category: 'A'},
...
]
Now the empty string gets returned as a facet. How can I remove this? Would it just be a matter of setting it to null instead of an empty string initially?
{
"counts": [
{
"count": 667,
"highlighted": "",
"value": ""
},
{
"count": 191,
"highlighted": "A",
"value": "A"
},
...
],
"field_name": "category",
"stats": {
"total_values": 9
}
}
Kishore Nallan
03/22/2023, 10:41 AMIvan Bacher
03/22/2023, 10:42 AM