Facing problem on groupBy query In Golang (in raw ...
# community-help
m
Facing problem on groupBy query In Golang (in raw query too). Not get enough product under some group_key . For example some product have multiple segment some have single segment . I want same product under segment_1 and segment_2 at a time by order_idx . What is notice is that groupkeys and product not maintain order_idx properly (hypothesis)
Copy code
sample document
{
   "id":1,
   "title":"Product 1",
   "status":"active",
   "order_idx":1,
   "taxonomies":{
      "segment":[
         "segment_1",
         "segment_2"
      ]
   }
}

actual query
searchParameters := &api.SearchCollectionParams{
		Q:              "",
		QueryBy:        "title",
		FilterBy:       "status := active",
		SortBy:         "order_idx : ASC",
		Page:           1,
		GroupBy:        "taxonomies.segment" ,
		GroupLimit:     4,
	}