When I do a search with a grouping result and do a group constraint, I get that numFound matches I when I don't use the constraint.
It appears that SOLR first searches and computes numFound, and then restricts the results.
I cannot use pagination and other things. Is there any workaround or am I missing something?
Example:
====================================== | id | publisher | book_title | ====================================== | 1 | A1 | Title Book | | 2 | A1 | Book title 123 | | 3 | A1 | My book | | 4 | B2 | Hi book title | | 5 | B2 | Another Book |
If I execute the request:
q=book_title:book &group=true &group.field=publisher &group.limit=1 &group.main=true
I get numFound 5 , but only 2 in the results .
"response": { "numFound": 5, "docs": [ { "book_title": "My book", "publisher": "A1" }, { "book_title": "Another Book", "publisher": "B2" } ] }
source share