You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Cömert Baldemir <co...@gmail.com> on 2022/12/29 20:54:37 UTC
Hi, I want grouping using a comma separated field 'label' value.
{
"responseHeader":{
"zkConnected":true,
"status":0,
"QTime":24,
"params":{
"q":"*:*",
"facet.field":"label",
"indent":"true",
"q.op":"OR",
"facet":"true"}},
"response":{"numFound":3,"start":0,"maxScore":1.0,"numFoundExact":true,"docs":[
{
"id":8852997081588663979,
"title_tr":"Lorem Ipsum has been the industry's standard dummy",
"date":"26 November Friday 20:00 PM",
"description_tr":"It was popularised in the 1960s with the release of
Letraset sheets",
"location":"NewYork",
"corporate":"Lorem Ipsum has been the industry's standard dummy",
"label":"discount > summer > winter",
"version":1753557983959187456},
{
"id":1573818487762250308,
"title_tr":"Lorem Ipsum has been the industry's standard dummy",
"date":"26 November Friday 20:00 PM",
"description_tr":"It was popularised in the 1960s with the release of
Letraset sheets",
"location":"NewYork",
"corporate":"Lorem Ipsum has been the industry's standard dummy",
"label":"fashion > sport > winter",
"version":1753559685284233216},
{
"id":8253796694904402272,
"title_tr":"Lorem Ipsum has been the industry's standard dummy",
"date":"26 November Friday 20:00 PM",
"description_tr":"It was popularised in the 1960s with the release of
Letraset sheets",
"location":"NewYork",
"corporate":"Lorem Ipsum has been the industry's standard dummy",
"label":"discount > spring",
"version":1753558107987902464}]
},
"facet_counts":{
"facet_queries":{},
"facet_fields":{
"label":[
"discount",2,
"winter",2,
"fashion",1,
"sport",1,
"spring",1,
"summer",1]},
"facet_ranges":{},
"facet_intervals":{},
"facet_heatmaps":{}}}
1-) I did group by facet but I didn't group by 'label' field. I output
warning: "Sorting on a tokenized field that is not a SortableTextField is
not supported in cloud mode."
2-) I updated the label field as SortableTextField. I grouped by 'label'
field but it did without tokenizer/analysis and problem not solved.
{
"responseHeader":{
"zkConnected":true,
"status":0,
"QTime":46,
"params":{
"q":"*:*",
"facet.field":"label",
"indent":"true",
"q.op":"OR",
"facet":"true",
"group.field":"label",
"group":"true"}},
"grouped":{
"label":{
"matches":3,
"groups":[{
"groupValue":"discount > summer > winter",
"doclist":{"numFound":1,"start":0,"maxScore":1.0,"numFoundExact":true,"docs":[
{
"id":8852997081588663979,
"title_tr":"Lorem Ipsum has been the industry's standard dummy",
"date":"26 November Friday 20:00 PM",
"description_tr":"It was popularised in the 1960s with the release of
Letraset sheets",
"location":"NewYork",
"corporate":"Lorem Ipsum has been the industry's standard dummy",
"label":"discount > summer > winter",
"version":1753560422507610112}]
}},
{
"groupValue":"fashion > sport > winter",
"doclist":{"numFound":1,"start":0,"maxScore":1.0,"numFoundExact":true,"docs":[
{
"id":1573818487762250308,
"title_tr":"Lorem Ipsum has been the industry's standard dummy",
"date":"26 November Friday 20:00 PM",
"description_tr":"It was popularised in the 1960s with the release of
Letraset sheets",
"location":"NewYork",
"corporate":"Lorem Ipsum has been the industry's standard dummy",
"label":"fashion > sport > winter",
"version":1753560563750797312}]
}},
{
"groupValue":"discount > spring",
"doclist":{"numFound":1,"start":0,"maxScore":1.0,"numFoundExact":true,"docs":[
{
"id":8253796694904402272,
"title_tr":"Lorem Ipsum has been the industry's standard dummy",
"date":"26 November Friday 20:00 PM",
"description_tr":"It was popularised in the 1960s with the release of
Letraset sheets",
"location":"NewYork",
"corporate":"Lorem Ipsum has been the industry's standard dummy",
"label":"discount > spring",
"version":1753560603188789248}]
}}]}},
"facet_counts":{
"facet_queries":{},
"facet_fields":{
"label":[
"discount > spring",1,
"discount > summer > winter",1,
"fashion > sport > winter",1]},
"facet_ranges":{},
"facet_intervals":{},
"facet_heatmaps":{}}}
3-) Is there a solution to this problem? When I searched, it said about
can't be done 6.4.2 +, is this correct?
https://zditect.com/blog/2243093.html