Daniele Sesoldi
12/09/2024, 4:17 PM{
"query_by": "embedding,title,content",
"vector_query": "embedding:([], alpha: 0.5, distance_threshold: 0.8, k: 200)",
"per_page": 0,
"group_by": "itemId",
"facet_by": "template,extension",
"collection": "xxx_it-IT",
"exclude_fields": "embedding",
"q": "template mappa organizzativa",
"prefix": false,
"highlight_fields": "none",
"highlight_full_fields": "none",
"filter_by": ""
}
The first facet I get in the response is
"count": 78,
"value": "InternalDocument"
Here's the query to get the search results:
{
"query_by":"embedding,title,content",
"vector_query":"embedding:([], alpha: 0.5, distance_threshold: 0.8, k: 200)",
"q":"template mappa organizzativa",
"per_page":12",
"page": 1,
"highlight_fields":"title,content",
"highlight_full_fields":"none",
"highlight_affix_num_tokens":15,
"prefix":false,
"exclude_fields":"embedding,content",
"group_by":"itemId",
"collection":"xxx_it-IT",
"filter_by":""
}
I get
"found": 164
results.
If I add a filter of a faceted field, the new query for the results become:
{
"query_by": "embedding,title,content",
"vector_query": "embedding:([], alpha: 0.5, distance_threshold: 0.8, k: 200)",
"q": "template mappa organizzativa",
"per_page": 12,
"page": 1,
"highlight_fields": "title,content",
"highlight_full_fields": "none",
"highlight_affix_num_tokens": 15,
"prefix": false,
"exclude_fields": "embedding,content",
"group_by": "itemId",
"collection": "xxx_it-IT",
"filter_by": "template:=[InternalDocument]"
}
Now I get
"found": 144
results. I verified that all of the results are with template = InternalDocument.
My question is why as the facet count I get 78 results and when I search with the template filter for the same facet value I get 144 results.
Have you any suggestions about that?