Project

Profile

Help

Story #5788

closed

Story #5517: [EPIC] Automation Hub Release Blockers

As a user, fulltext search includes "content match" in the search results

Added by bmbouter about 5 years ago. Updated about 3 years ago.

Status:
CLOSED - DUPLICATE
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Ticket moved to GitHub: "pulp/pulp_ansible/701":https://github.com/pulp/pulp_ansible/issues/701


Return a content_match object similar to that found in v2 API search results.

As an example, if the user searches for the keyword "dynatrace", the v2 API currently returns the following object for each item contained in collections.results[]:

content_match": {
    "total_count": 4,
    "contents": {
        "module": [
            "dynatrace_deployment",
            "dynatrace_comment"
            ],
        "role": [
            "dynatrace_custom_deployment",
            "dynatrace_problem_comment"
            ],
        "plugin": []
        }
   }

From the above, the UI knows that 2 modules and 2 roles matched.

Another thing we talked about fixing in Community Galaxy, and that we do not want to proliferate in AH, is the lack of a total count being displayed in the UI for each content type. In other words, from the above, the UI knows that 2 modules matched. However, it does not know (or at least does not display) that the collection contains a total of 2 modules. What we want to see in the UI is something like, "Matching modules: 2/2".

If you look at the response object returned in the v2 API, you will find a content_summary object. As part of this story, let's verify with the UI team that returning this object is sufficient or if something else is preferred. If something else, then add that. Otherwise, make sure content_summary is returned.

Here's an example of the content_summary object:

"content_summary": {
    "total_count": 4,
    "contents": {
        "module": [
            "dynatrace_deployment",
            "dynatrace_comment"
            ],
        "role": [
            "dynatrace_custom_deployment",
            "dynatrace_problem_comment"
            ],
        "plugin": []
        }
},

You can view the full response object from the Galaxy v2 API that includes the above examples here:

https://galaxy.ansible.com/api/internal/ui/search/?deprecated=false&keywords=dynatrace&order_by=-relevance&page=1

The code behind content_match can be viewed here:
https://github.com/ansible/galaxy/blob/devel/galaxy/api/internal/search.py#L177

Actions #1

Updated by bmbouter about 5 years ago

  • Parent issue set to #5517

Related to Automation Hub issue: https://github.com/ansible/galaxy-dev/issues/200

Actions #2

Updated by bmbouter about 5 years ago

  • Project changed from Pulp to Ansible Plugin
Actions #3

Updated by chouseknecht almost 5 years ago

  • Description updated (diff)
Actions #4

Updated by bmbouter almost 5 years ago

@chouse, what search query would produce this specific result?

Also can you link to the existing implementation so we can see how it's done?

Actions #5

Updated by chouseknecht almost 5 years ago

  • Description updated (diff)
Actions #6

Updated by chouseknecht almost 5 years ago

  • Description updated (diff)
Actions #7

Updated by chouseknecht almost 5 years ago

  • Description updated (diff)
Actions #8

Updated by chouseknecht almost 5 years ago

bmbouter wrote:

@chouse, what search query would produce this specific result?

Also can you link to the existing implementation so we can see how it's done?

bmbouter Added links to example response object and code in the story Description above.

Actions #9

Updated by pulpbot about 3 years ago

  • Description updated (diff)
  • Status changed from NEW to CLOSED - DUPLICATE

Also available in: Atom PDF