Solr collapse result repeat in 6.6.5 cloud example techproducts.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Solr collapse result repeat in 6.6.5 cloud example techproducts.

刘正
i try request this to techproducts collection

{code}
select?fl=id,genre_s&fq={!collapse%20field=genre_s}&indent=on&q=genre_s:*&wt=json
{code}

and i get response

{code:json}
{
  "responseHeader":{
    "zkConnected":true,
    "status":0,
    "QTime":6,
    "params":{
      "q":"genre_s:*",
      "indent":"on",
      "fl":"id,genre_s",
      "fq":"{!collapse field=genre_s}",
      "wt":"json"}},
  "response":{"numFound":3,"start":0,"maxScore":1.0,"docs":[
      {
        "id":"0812521390",
        "genre_s":"fantasy"},
      {
        "id":"0553573403",
        "genre_s":"fantasy"},
      {
        "id":"0553293354",
        "genre_s":"scifi"}]
  }}
{code}

when i request in grouping

{code}
select?fl=id,genre_s&group.field=genre_s&group.limit=1&group=true&indent=on&q=genre_s:*&wt=json
{code}

i get the response

{code:json}
{
  "responseHeader":{
    "zkConnected":true,
    "status":0,
    "QTime":9,
    "params":{
      "q":"genre_s:*",
      "indent":"on",
      "fl":"id,genre_s",
      "group.limit":"1",
      "wt":"json",
      "group.field":"genre_s",
      "group":"true"}},
  "grouped":{
    "genre_s":{
      "matches":10,
      "groups":[{
          "groupValue":"fantasy",
          "doclist":{"numFound":8,"start":0,"maxScore":1.0,"docs":[
              {
                "id":"0553573403",
                "genre_s":"fantasy"}]
          }},
        {
          "groupValue":"scifi",
          "doclist":{"numFound":2,"start":0,"docs":[
              {
                "id":"0553293354",
                "genre_s":"scifi"}]
          }}]}}}
{code}
Reply | Threaded
Open this post in threaded view
|

Re: Solr collapse result repeat in 6.6.5 cloud example techproducts.

Joel Bernstein
Do you have more then one shard? Collapse requires that all docs in the
same collapse group be co-located on the same shard.

Grouping I believe does not require this is some scenarios.


Joel Bernstein
http://joelsolr.blogspot.com/


On Thu, Feb 7, 2019 at 4:07 PM 刘正 <[hidden email]> wrote:

> i try request this to techproducts collection
>
> {code}
>
> select?fl=id,genre_s&fq={!collapse%20field=genre_s}&indent=on&q=genre_s:*&wt=json
> {code}
>
> and i get response
>
> {code:json}
> {
>   "responseHeader":{
>     "zkConnected":true,
>     "status":0,
>     "QTime":6,
>     "params":{
>       "q":"genre_s:*",
>       "indent":"on",
>       "fl":"id,genre_s",
>       "fq":"{!collapse field=genre_s}",
>       "wt":"json"}},
>   "response":{"numFound":3,"start":0,"maxScore":1.0,"docs":[
>       {
>         "id":"0812521390",
>         "genre_s":"fantasy"},
>       {
>         "id":"0553573403",
>         "genre_s":"fantasy"},
>       {
>         "id":"0553293354",
>         "genre_s":"scifi"}]
>   }}
> {code}
>
> when i request in grouping
>
> {code}
>
> select?fl=id,genre_s&group.field=genre_s&group.limit=1&group=true&indent=on&q=genre_s:*&wt=json
> {code}
>
> i get the response
>
> {code:json}
> {
>   "responseHeader":{
>     "zkConnected":true,
>     "status":0,
>     "QTime":9,
>     "params":{
>       "q":"genre_s:*",
>       "indent":"on",
>       "fl":"id,genre_s",
>       "group.limit":"1",
>       "wt":"json",
>       "group.field":"genre_s",
>       "group":"true"}},
>   "grouped":{
>     "genre_s":{
>       "matches":10,
>       "groups":[{
>           "groupValue":"fantasy",
>           "doclist":{"numFound":8,"start":0,"maxScore":1.0,"docs":[
>               {
>                 "id":"0553573403",
>                 "genre_s":"fantasy"}]
>           }},
>         {
>           "groupValue":"scifi",
>           "doclist":{"numFound":2,"start":0,"docs":[
>               {
>                 "id":"0553293354",
>                 "genre_s":"scifi"}]
>           }}]}}}
> {code}
>