Documentation search engine

I noticed today that the Ansible Documentation search engine gives less-than-optimal results. For example, I used to search for ‘ansible.builtin.file’ and the first result would be the ansible.builtin.file module. But now I get a list like as shown in the screenshot. I have to scroll quite a ways down the page to find the module I’m looking for. When I finally do find the module, I click to view its documentation, and every search term is highlighted in yellow on the page. Maybe I’m not using the search engine correctly? Is there documentation on how to use it? I’d file a bug, but I don’t know where to file the bug report to. I’m also not entirely sure this is actually a bug and not a pebcak. The new search engine has a sort of “AI feel” to it, but honestly I don’t know how it’s developed.

The yellow highlighting indicates that the search query was split by words. When I wrap the search query in quotes, I get basically the same list of results. The quotes have no effect.

My guess is that this is related to Switching search on docs to OpenSearch.

1 Like

Yes, this is the OpenSearch search engine we use now. The older search was proprietary and costs $$. We are now on the free option for community documentation. I don’t know how to improve it, to be honest, but open to suggestions or alternatives.

2 Likes

Thank you for verifying. I’m glad it’s not AI-powered and that you’ve chosen a FOSS option. I think I just have to read the documentation for OpenSearch and figure out how to use it effectively. Odd that it isn’t intuitive by default though. I would expect wrapping the search query in quotes would search for the literal string on any search engine.

1 Like

You might find the search on ReadTheDocs to provide better results.

https://ansible.readthedocs.io/projects/ansible/latest/

This also lets you search subprojects that build with Sphinx. Select the fly out menu in the lower right of the page to access search.

Please do note that the content is the same on ansible.readthedocs.io as it is on docs.ansible.com. However the Ansible package docs and core docs on ReadTheDocs remain somewhat “experimental” for the time being. You should always consult docs.ansible.com as the official content for those two doc sets.

Also, if you do find the search on ReadTheDocs more efficient or useful, please let us know! That would be interesting feedback. Thank you.

1 Like

Search results for me are identical. I thought this was controlled by sphinx using OpenSearch, not by readthedocs?

The search box in the left nav uses OpenSearch and is independent of the hosting platform. The search box in the RTD fly out menu uses ElasticSearch: Server side search — Read the Docs user documentation

1 Like

ooOOOOooo! thanks for that! I’ll try banging on it and see how it goes!

1 Like

Thank you! The fly-out menu on RTD is more useful when I want to find a module by searching its literal name, like “ansible.builtin.file”. The first result is exactly what I want.

3 Likes