Skip to content

Make party fields in the docket search results to maintain order consistency #4531

Open

Description

In the following query: https://www.courtlistener.com/api/rest/v4/search/?q=antitrust&type=r

You can observe that the first attorney is listed as James F Keller, but the first attorney_id is 269313, which belongs to a different attorney. As a result, the attorney and attorney_id lists do not match due to the differing order.

This issue also occurs with other party related fields such as party, party_id, firm, and firm_id.

The problem is that we're using a set() to build these lists. Since sets in Python are unordered, the order of values added to the set is not guaranteed.

To resolve this, we should ensure that the lists of parties maintain the correct order. Using a list() instead of a set() may be sufficient, as long as we take care to prevent duplicates when indexing parties.

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

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status

      No status
    • Status

      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions