Skip to content

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

Description

I have

  • Tested with the latest release
  • Tested with the current master branch
  • 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions