In my template, I have a field called Category which is a type of DropLink
and not MultiList
. When I tried to find it in SOLR, I got this field as below.
"category_sm":["{951063A6-0BBA-484F-8CAB-A7C11AF977BA}"]
When I tried to query this field like
categoryQuery = categoryQuery.And(i => i.CategoryId.Contains(Guid.Parse(payload.CategoryId)));
Where the CategoryId field is defined in the Model like.
[IndexField("category_sm")]
public List<Guid> CategoryId { get; set; }
I got no result. When I check the log, I found that category id is being parsed as
?q=(_template:(f250acc7e16e4f6cb7b8a2e6f41a6bf4) AND category_sm:(05414a8228ea40b18a4d86fcbdbf4a97))&start=0&rows=1000000&fl=*,score&fq=_indexname:(sitecore_master_index)
instead of
?q=(_template:(f250acc7e16e4f6cb7b8a2e6f41a6bf4) AND category_sm:{951063A6-0BBA-484F-8CAB-A7C11AF977BA})&start=0&rows=1000000&fl=*,score&fq=_indexname:(sitecore_master_index)
Sitecore Version: 9.3 SOLR: 8.1.1