Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify number of references on Authorities Page vs. Search Results #4865

Open
elisa-a-v opened this issue Dec 30, 2024 · 1 comment
Open

Comments

@elisa-a-v
Copy link
Contributor

elisa-a-v commented Dec 30, 2024

Noticed after doing #4134

On the “Authorities” page for a given docket, we display the references to opinions in the docket's documents. However, each "authority" in the list is not actually an opinion, but an element of a Docket's authorities:

    @property
    def authorities(self):
        """Returns a queryset that can be used for querying and caching
        authorities.
        """
        return OpinionsCitedByRECAPDocument.objects.filter(
            citing_document__docket_entry__docket_id=self.pk
        )
class OpinionsCitedByRECAPDocument(models.Model):
    citing_document = models.ForeignKey(
        RECAPDocument, related_name="cited_opinions", on_delete=models.CASCADE
    )
    cited_opinion = models.ForeignKey(
        Opinion, related_name="citing_documents", on_delete=models.CASCADE
    )
    depth = models.IntegerField(
        help_text="The number of times the cited opinion was cited "
        "in the citing document",
        default=1,
    )

This means an opinion cited by multiple documents in the same docket will be listed multiple times, like the authorities in this docket. Notice Norman v. United States, 429 F.3d 1081 (Fed. Cir. 2005) being listed 14 times, where all links point to the same search which yields 14 docket entries.
Image
Image

This also means the counts are confusing. Each "depth" represents only the number of times the opinion is cited in one citing document, not the total number of references across all documents in the docket. We could:

  1. Make the counts less confusing by making the authorities list include the citing document and changing the text to something like 5 references to <CITED_OPINION> in <CITING_DOC>, with a link to the citing doc.

  2. Group authorities by opinion, then aggregate the depth. This way we would get the summary of all references to a given opinion in a given docket, instead of having the same opinion repeated several times. This does sound like it could be a lot more work, but potentially more informative if we could also include a sub-list of all citing docs with their links.

    So instead of:

    • 5 references to Norman v. United States, 429 F.3d 1081 (Fed. Cir. 2005)
      Court of Appeals for the Federal Circuit Nov. 18, 2005
    • 5 references to Norman v. United States, 429 F.3d 1081 (Fed. Cir. 2005)
      Court of Appeals for the Federal Circuit Nov. 18, 2005
    • 2 references to Norman v. United States, 429 F.3d 1081 (Fed. Cir. 2005)
      Court of Appeals for the Federal Circuit Nov. 18, 2005

    It would be:

    • 12 references to Norman v. United States, 429 F.3d 1081 (Fed. Cir. 2005)
      Court of Appeals for the Federal Circuit Nov. 18, 2005
      • 5 references in citing doc 1
      • 5 references in citing doc 2
      • 2 references in citing doc 3
  3. Update the search results to display the depth of treatment when a cites query is made, so that each result shown says something like, "22 references to case XYZ".

Whatever the option, we should make sure that the opinions' authorities page doesn't get broken since authorities_list.html is used in both docket and opinion authorities, which are not OpinionsCitedByRECAPDocument but OpinionsCited so we don't always have the same attributes available.

@mlissner
Copy link
Member

Fun, so this issue is indeed worse than we thought. I didn't realize that we're repeating the same case many times in the list of authorities. That's not great.

The easiest thing is to aggregate on the depth and have it say something like:

3 filings make 14 references to XYZ

We don't need to say which filings do that on this page, so we can spare ourselves that nested layout you describe.

Aggregating the depth should be easy. I can't think offhand how to get the filing count, but I'm guessing it's not too hard either and can be done at the query-level as well.

If we do the above, I think that fixes the confusion issue too, since it says the number of documents and then when you click on it, that's how many show up in the search results.

One last thing: We're introducing a second count to this page. Currently, it's ordered by the citation depth, but I think if we make this change, we should order by the number of filings citing a document instead. I guess a later feature could be to allow users to choose which ordering they prefer.

@mlissner mlissner moved this to Backlog Jan 13 - Jan 24 in Sprint (Web Team) Dec 31, 2024
@mlissner mlissner moved this to CourtListener Backlog in Volunteer backlog Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog Jan 13 - Jan 24
Status: CourtListener Backlog
Development

No branches or pull requests

2 participants