Main Content

Index and Search Models with Model Finder

Use the Model Finder to index, search, and browse examples, models, and projects across multiple databases. Indexing a model in a database stores the model name, path, blocks, and description as textual information, making it easy to discover. Model Finder supports multiple databases including the default MathWorks® database and any databases you create. Creating your own databases to index a group of similar models makes it easier to search, maintain, and control access to these databases.

Here is how you can use Model Finder to support a collaborative development of models in your teams:

  • Create — Create a new or use an existing database for your project. Share the database with the developers across multiple teams.

  • Configure — Team members configure the shared database with Model Finder and use it as the central repository to index and search models.

  • Index — To make models easily findable, team members index their models in the shared database.

  • Search — Team members can easily search the shared database to find relevant models and use the models for collaborative development.

Workflow to use Model Finder

Configure and Search Databases

By default, Model Finder uses the MathWorks database of examples, models, and projects. You can also configure your databases with Model Finder to index and search models.

  1. Create new databases — Create multiple databases to organize models in separate indexes. Using multiple indexes enables easy sharing, searching, and maintenance of models. By sharing databases only with specific teams, you can control access to models. To create new databases, use the modelfinder.createDatabase function.

    For example, create databases digital_systems.db and analog_systems.db, and assign aliases Digital and Analog, respectively.


    Model Finder uses the aliases to display the databases. If an alias is not set, the database file name is used as the alias. To view the list of databases registered with Model Finder, open the Model Finder UI by using the modelfinderui function and click Configure Databases.

  2. Register existing databases — Register your existing databases with Model Finder by using the modelfinder.registerDatabase function.

    For example, register existing databases continuous_systems.db and discrete_systems.db, and assign aliases Continuous and Discrete, respectively.

  3. Configure databases to search models — By default, the MathWorks database is set as the search scope of Model Finder. To change the search database, open the Model Finder UI by using modelfinderui function and click Configure Databases. Select the databases from the list you want to set as the search databases and click Save.

    Alternatively, you can set the search databases by using the modelfinder.setSearchDatabase function. For example, set registered databases digital_systems.db and analog_systems.db as the search databases to find models.

  4. Index models in database — Index models in a database to store the textual information of the models such as model names, example names, model paths, description, annotation, block names, and block types. You can index models in the default database or a specific Model Finder database by using the modelfinder.registerFolder function.

    For example, index models from the folder named wireless in the default database.


    You can also change the default database and use it to index models. To change the default database, use the modelfinder.setDefaultDatabase function.

  5. Search the databases — In the Model Finder UI, enter a search term in the Search box. Model Finder supports keyword-based search and natural language query. When you enter a search query, Model Finder returns a set of examples, models, and projects that match your search string in the selected databases.

    Alternatively, use the modelfinder function to search databases. For example, search for models in the search databases using the search term autosar.

  6. Remove databases from Model Finder — If you do not want to index or search models in certain databases, you can remove those databases from Model Finder. For more information on removing databases from Model Finder, see modelfinder.unregisterDatabase. Removing a database from Model Finder will not delete models or database.

    For example, remove registered database digital_systems.db from Model Finder.

  7. Remove models from databases — If you do not want some models to appear in the search results of Model Finder, remove the folder that contains those models using the modelfinder.unregisterFolder function. The function removes the folder and its contents from those databases that are set as search databases of Model Finder. For example, remove registered folder wireless from the search databases of Model Finder.



To view the changes in the Model Finder UI made using Model Finder functions, close and reopen the Model Finder UI.

See Also