Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-7742

Metadata system does not order search results based on score correctly across metadata scopes

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.6.0
    • Fix Version/s: 4.0.0
    • Component/s: Metadata
    • Labels:
    • Release Notes:
      Fixed the ordering of search results by relevance in the search RESTful API.
    • Rank:
      1|hzzpjz:

      Description

      The search algorithm scores each search result based on the number of matched terms. This scoring is correct only for either MetadataScope.USER or MetadataScope.SYSTEM, but not across both (which is the only exposed usecase.

      This bug will be triggered if the search query has matches in both scopes. The code in question is DefaultMetadataStore.java#L371-L374. Since the search results are sorted by score in each scope separately, then merged into a set, the ultimate ordering may not be correct.

        Attachments

          Activity

            People

            • Assignee:
              bhooshan Bhooshan Mogal
              Reporter:
              bhooshan Bhooshan Mogal
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: