In typesense version 30.1 I am facing weird issue ...
# community-help
v
In typesense version 30.1 I am facing weird issue as explained below: When i am running below query then it is returning foundry name (fdy_name) “Inviline” in response in facet data but its record actually does not exists in grouped_hits. I checked all paginated pages but that record does not exists. Then to re-confirm i used same query but without group_by just to check if i am getting any data with name “Inviline” so I am not getting any data so now question here is in facet data why I am getting it when it does not even exists in main results? @Kishore Nallan can you pls help here facet data
Copy code
{
                "count": 1,
                "facet_filter": "$mtc_styles_20260319(fdy_name: `Inviline`)",
                "highlighted": "Inviline",
                "value": "Inviline"
            },
query
Copy code
{
  "collection": "mtc_font_embeddings_data",
  "q": "*",
  "filter_by": "family_id:!=1266 && is_default:=true && is_serif:=true && is_sans:=false && $mtc_styles_data($mtc_list_style_mappings_data(list_id:=sys_list_49 || list_id:=sys_list_44 || list_id:=sys_list_54 || list_id:=sys_list_53 || list_id:=sys_list_43 || list_id:=sys_list_51 || list_id:=sys_list_47 || list_id:=sys_list_48 || list_id:=sys_list_24 || list_id:=sys_list_46 || list_id:=sys_list_19 || list_id:=sys_list_55 || list_id:=sys_list_42 || list_id:=sys_list_34 || list_id:=sys_list_52 || list_id:=addon_0c7f8b8c-c8d6-4bac-b0c6-bcad4692cbc1) && cvp_width_value:=300 && cvp_height_value:=100 && font_langs_en:!=[ar] && font_langs_en:!=[he] && font_langs_en:!=[ja] && font_langs_en:!=[ko] && font_langs_en:!=[zh-Hant] && font_langs_en:!=[zh-Hans] && $mtc_foundries_data(id:*))",
  "vector_query": "body_embeddings:([0.752036,-0.797508,0,-0.86267,0.76113,0.684734,-0.718115,-0.397804,-0.716131,0.923868,0.80179,0.881492,-0.870096,-0.738616,0.788121,0.866227], k: 2000, distance_threshold: 1.5)",
  "per_page": 250,
  "page": 1,
  "include_fields": "style_id,family_id,$mtc_families_data(id,family_url_key,image_urls,name_en,title_en),$mtc_styles_data(id,font_name,font_url_key,font_nids,font_ps_names,md5,font_pim_style_id,is_custom,is_var,is_default,is_imported_font,derelease_date,render_md5,font_mat_num,tags_font_en,$mtc_foundries_data(handle,logo,name_en,title_en),$mtc_list_style_mappings_data(list_id,metadata,style_id))",
  "exclude_fields": "heading_embeddings,body_embeddings",
  "facet_by": "$mtc_styles_20260319(fdy_name),$mtc_styles_data(font_advanced_typography),$mtc_styles_data(font_langs_en),$mtc_styles_data(tags_font_en)",
  "max_facet_values": 500,
  "include_facets": true,
  "group_by": "family_id"
}
@Kishore Nallan looking for your help
a
Hey Vikas, Two things are happening: 1. Seems like you are faceting on collection mtc_styles_20260319 (a dated snapshot) but showing data from mtc_styles_data in your results. 2. Facets cover everything, hits are paginated: Even without group_by, facets reflect ALL matching documents. With the vector search using k=2000, up to 2000 documents contribute to facets, but only the top-scoring ones appear in paginated hits. Could you add the facet filter to filter_by to verify that the document exists? If it returns no results, you might have stale data.
v
mtc_styles_data is alias which is pointing to mtc_styles_20260319 so both are same
a
Are you in cloud?
v
No
No results with facet filter to filter_by { “collection”: “mtc_font_embeddings_data”, “q”: “*”, “filter_by”: “family_id:!=1266 && is_default:=true && is_serif:=true && is_sans:=false && $mtc_styles_data($mtc_list_style_mappings_data(list_id:=sys_list_49 || list_id:=sys_list_44 || list_id:=sys_list_54 || list_id:=sys_list_53 || list_id:=sys_list_43 || list_id:=sys_list_51 || list_id:=sys_list_47 || list_id:=sys_list_48 || list_id:=sys_list_24 || list_id:=sys_list_46 || list_id:=sys_list_19 || list_id:=sys_list_55 || list_id:=sys_list_42 || list_id:=sys_list_34 || list_id:=sys_list_52 || list_id:=addon_0c7f8b8c-c8d6-4bac-b0c6-bcad4692cbc1) && cvp_width_value:=300 && cvp_height_value:=100 && font_langs_en:!=[ar] && font_langs_en:!=[he] && font_langs_en:!=[ja] && font_langs_en:!=[ko] && font_langs_en:!=[zh-Hant] && font_langs_en:!=[zh-Hans] && $mtc_foundries_data(id:*)) && $mtc_styles_20260319(fdy_name:=[Inviline])“, “vector_query”: “body_embeddings:([0.752036,-0.797508,0,-0.86267,0.76113,0.684734,-0.718115,-0.397804,-0.716131,0.923868,0.80179,0.881492,-0.870096,-0.738616,0.788121,0.866227], k: 2000, distance_threshold: 1.5)“, “per_page”: 250, “page”: 3, “include_fields”: “style_id,family_id,$mtc_families_data(id,family_url_key,image_urls,name_en,title_en),$mtc_styles_data(id,font_name,font_url_key,font_nids,font_ps_names,md5,font_pim_style_id,is_custom,is_var,is_default,is_imported_font,derelease_date,render_md5,font_mat_num,tags_font_en,$mtc_foundries_data(handle,logo,name_en,title_en),$mtc_list_style_mappings_data(list_id,metadata,style_id))“, “exclude_fields”: “heading_embeddings,body_embeddings”, “facet_by”: “$mtc_styles_20260319(fdy_name),$mtc_styles_data(font_advanced_typography),$mtc_styles_data(font_langs_en),$mtc_styles_data(tags_font_en)“, “max_facet_values”: 500, “include_facets”: true
Copy code
}
@Alan Martini another insight to this problem. With group_by: “Inviline” is appearing in facet data WITHOUT group_by: In facet data “Inviline” is not coming Please check both the screenshots
a
Vikas, facet_filter is not a parameter. What I meant is to add the facet that you are filtering on to filter_by. In your case, just add whatever you added to facet_filter inside the filter_by
Unfortunately is kind of hard to debug self hosted clusters, since we dont have access to a bunch of stuff that we set up in Cloud
v
Yes, I already tried by adding facet onto filter_by but still it seems a bug.
Is there any forum where I can raise this issue?
a
Yes, in Issues · typesense/typesense If you can create a self contained reproducible example, we can quickly iterate over it