ansible / galaxy-dev

Ansible Automation Hub
11 stars 13 forks source link

API: return content match in search results #200

Open chouseknecht opened 4 years ago

chouseknecht commented 4 years ago

The Galaxy API includes a content_match object on each search result item, and the UI is able to show the user what content matched the user query. For example, 3 plugin might match the search keyword because it was found in the plugin name or description. Mirror this in AH. Re-think the design a bit, as the current Galaxy search display has created some confusion.

bmbouter commented 4 years ago

@cutwater where can I see an example of code that would produce the content match in the result along with an example result?

bmbouter commented 4 years ago

Also I filed this Pulp story: https://pulp.plan.io/issues/5788

chouseknecht commented 4 years ago

@bmbouter

The example we discussed while in Durham was from Community Galaxy. Here's an example:

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

Look for content_match inside the collection object.