Hi,
Yes, you are correct that the configuration should be stored in the ui.config module.
In terms of the node structure, you can create a new node under /apps/<your-project-name>/install with the name of the package you want to create, for example, "search-indexes". Then, you can add a sub-node named "filter.xml" which contains the indexing rules in the format defined by Apache Lucene. You can also add any other necessary configuration files or folders under the package node.
Here's an example of the node structure:
/apps/<your-project-name>/install/search-indexes/ /apps/<your-project-name>/install/search-indexes/filter.xml
Once you have the configuration stored in the ui.config module, you can package it into a content package and deploy it to your AEM environment as part of your code deployment process.