ITADN

Unable to retrieve results using pysolr.search() with grouping

#401Openprasadbattularaghavendra 创建于 2023-05-22
# I have * [x] Tested with the latest release * [ ] Tested with the current master branch * [x] Searched for similar existing issues ## Expected behavior I expect to retrieve search results grouped by the specified field (**sno**) based on the provided query. The results should be similar to what I see in the Solr UI. ## Actual behavior No search results are returned. The results variable is empty. ## Steps to reproduce the behavior 1. Use pysolr library to connect to Solr instance. 2. Execute the following search query with grouping in Python: ``` results = solr.search(query, **{"group": "true", "group_field": "sno", "group_offset": 0, "group_limit": 1, "group_sort": "date desc", "group_ngroups": "true", "rows": 1000}) ``` Alternatively, I tried the query below which gives me: ``` _(HTTP 400): [Reason: invalid boolean value: True]_- results = solr.search(query, **{_"group":True_, "group_field": "sno", "group_offset": 0, "group_limit": 1, "group_sort": "date desc", _"group_ngroups": True,_ "rows": 1000}) ``` ## Configuration * Operating system version: Windows 10 * Search engine version: * Python version: 3.8 * pysolr version: 3.9.0
2 条评论