ansys / ansys-sphinx-theme

PyData-based Sphinx theme from the PyAnsys community
https://sphinxdocs.ansys.com
MIT License
23 stars 7 forks source link

Restore multi-index search capabilities #573

Open jorgepiloto opened 4 weeks ago

jorgepiloto commented 4 weeks ago

After migrating to the new [Fuse.js] static search, searching across various search.json files is no longer supported. This has been a request raised by some developers. Thus, lets implement it back before v1.2.

Two options are possible.

  1. Selection of the index when searching. This provides a drop-down for selecting the desired index when searching.
  2. Unifying indices at build time. Desired indices are combined into a single search.json file. When searching, the search will show results from both indices.
greschd commented 4 weeks ago

Is there a way to assign weights to the parts of the combined index? When searching within a specific documentation, that module's API reference should have much higher priority than another module's API, for example. If that's not possible, I think a drop-down (or maybe simpler, a checkbox "search in related packages") is needed.

MaxJPRey commented 4 weeks ago

I asked for the implementation of a checkbox back in the days when edb and aedt where merged into a single package. That was really helpful for users. So if possible, I would also ask for it with our new approach.

jorgepiloto commented 4 weeks ago

Is there a way to assign weights to the parts of the combined index? When searching within a specific documentation, that module's API reference should have much higher priority than another module's API, for example. If that's not possible, I think a drop-down (or maybe simpler, a checkbox "search in related packages") is needed.

We may be able to do this using the sortFn function and some additional options in the conf.py.

I asked for the implementation of a checkbox back in the days when edb and aedt where merged into a single package. That was really helpful for users. So if possible, I would also ask for it with our new approach.

Regarding this, we will need UI/UX to guide us @Revathyvenugopal162. I am clueless about whether we should use a drop-down, checkboxes, or any others.

jorgepiloto commented 4 weeks ago

Since we need input from developers and UI/UX, we will postpone this for v1.3.

germa89 commented 4 weeks ago

PyMAPDL will not use this feature (at least for the moment), so I should probably not give an opinion. However I think any option is very valid, provided that switching to other indexes is clear and evident in the UI in case we go for option 1; or there is a proper highlighting of where the info is coming from in case 2. Of course, performance should be OK for very big indexes like PyAEDT.

Since some projects have tight integration, for instance PyFluent with Pyfluent-visualization, and Pyfluent-parametric; or PyDPF-Post with PyDPF-Core, etc.... You might want to go for the option 2, and make sure to highlight the repository the result is coming from.

PD. This could have been a poll in discussions.