http://1XX.XXX.XXX.XXX:8080/solr/autocomplete/select?q=displayterm:new&wt=json&indent=true&q.op=and&fl=displayterm&group=true&group.field=displayterm
Note : &group=true&group.field=displayterm
This response become group by displayterm
Response :
{
"responseHeader":{
"status":0,
"QTime":6,
"params":{
"fl":"displayterm",
"indent":"true",
"q":"displayterm:new",
"q.op":"and",
"group.field":"displayterm",
"group":"true",
"wt":"json"}},
"grouped":{
"displayterm":{
"matches":231,
"groups":[{
"groupValue":null,
"doclist":{"numFound":220,"start":0,"docs":[
{
"displayterm":"Professional News"}]
}},
{
"groupValue":"general",
"doclist":{"numFound":1,"start":0,"docs":[
{
"displayterm":"General News"}]
}},
{
"groupValue":"delhi",
"doclist":{"numFound":2,"start":0,"docs":[
{
"displayterm":"New Delhi"}]
}},
{
"groupValue":"care",
"doclist":{"numFound":1,"start":0,"docs":[
{
"displayterm":"New Born Care Week"}]
}},
{
"groupValue":"civil",
"doclist":{"numFound":1,"start":0,"docs":[
{
"displayterm":"NEW CIVIL HOSPITAL, SURAT"}]
}},
{
"groupValue":"blood",
"doclist":{"numFound":1,"start":0,"docs":[
{
"displayterm":"Newlife Blood Bank"}]
}},
{
"groupValue":"college",
"doclist":{"numFound":1,"start":0,"docs":[
{
"displayterm":"New Medical College Hospital"}]
}},
{
"groupValue":"degree",
"doclist":{"numFound":1,"start":0,"docs":[
{
"displayterm":"Homeopathy(Degree Course) Regulation New"}]
}},
{
"groupValue":"child",
"doclist":{"numFound":1,"start":0,"docs":[
{
"displayterm":"Reproductive, Maternal, Newborn, Child and Adolescent Health"}]
}},
{
"groupValue":"foundation",
"doclist":{"numFound":1,"start":0,"docs":[
{
"displayterm":"The new century Medical and Educational foundation malegaon, Nashik"}]
}}]}}}