Skip to content

Inherited methods/properties in search results are not sorted and presented optimallyΒ #3434

Open
@InMatrix

Description

@InMatrix

When users look up a method/property that's inherited from a base class, they could get a list of seemingly repetitive results. For example, the screenshot below is what search results look like for build on api.flutter.dev, because nearly every widget has a build method in Flutter.

image

Usually, only the method/property on the build class has human-authored explanation. In this case, they are on these two pages:

However, these two pages are 4th and 5th in the search results, respectively.

We discussed some heuristics to improve the ranking:

  1. Prioritize pages with more human-authored content over pages with less content (e.g, the current top result:
    https://api.flutter.dev/flutter/widgets/AnimatedWidget/build.html).
  2. Prioritize pages from the base class over pages from inherited classes

In addition, it could be helpful if the search box allows inputing multiple keywords. For example, when the user looks for a general explanation of the build method, they might put just "build" in their query. In a separate scenario, they might be interested in looking up the build method for a specific class. So it'd be natural to modify their query from "build" to "build AnimatedWidget" for example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onarea-searchIssues with the search boxtype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions