Skip to content
Snippets Groups Projects
Unverified Commit 831776bf authored by Jeff Bruemmer's avatar Jeff Bruemmer Committed by GitHub
Browse files

docs - model index (#35289)

parent 8e81f12e
No related branches found
No related tags found
No related merge requests found
......@@ -81,6 +81,10 @@ Metabase recognizes the following field types:
## Using field types in Metabase
### Fields types in models
You can set field types for models, which helps Metabase understand how to work with data in models built using SQL. You can also configure text fields in models to [surface individual records in search](./models.md#surface-individual-records-in-search-by-matching-against-this-column).
### X-rays
When you [X-ray](../exploration-and-organization/x-rays.md) a table, Metabase considers both the data type and the field type to display different charts that summarize that data.
......
......@@ -13,6 +13,7 @@ Models:
- Let you update column descriptions and customize metadata to create great starting points for exploration.
- Show up higher in search results and get highlighted when other users start new questions to promote reuse.
- Live in collections to keep them separate from messy database schemas.
- Can [surface individual records in search results](#surface-individual-records-in-search-by-matching-against-this-column).
For a deep dive on why and how to use models, check out our [Learn article on models][learn-models].
......@@ -111,6 +112,18 @@ You can specify whether a column should appear in the table view, or just in a d
- Text
- Link (it's a URL people should be able to click on)
### Surface individual records in search by matching against this column
For string fields in records with entity keys, Metabase will give you the option make the values in that field show up when people search your Metabase. Essentially, Metabase will index these values and make them available to Metabase's search engine. This option is handy when people often want to jump straight to an individual record in your model.
For example, if you have a model with accounts, you could turn on this option for a column listing the account's name or email so that people can quickly search for specific accounts in the model from anywhere in your Metabase. When people click on a record in the search results, Metabase will jump straight to the model and the object detail for that record.
There are some limitations to this indexing:
- The indexed field must be a text/string type.
- The record containing the field must have an integer entity key.
- To keep your search speedy, Metabase will only index 5000 unique values from that field, so this option isn't the best choice to turn on for tables with a ton of records.
## Edit a model's query
You can edit a model's query by clicking on the down arrow next to the model's name and clicking on **Edit query definition**. When you're doing editing, be sure to save your changes. Unlike questions, which prompt you to save as a new question, any changes here will overwrite the existing model. If you want to create a new model from an existing model, select **Duplicate this model** from the model sidebar (the icon of two overlapping squares).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment