How to use content and metadata fields in your documents
The content
field contains the searchable data of your documents. This is what gets indexed and can be queried.
content
when upserting documentsThe metadata
field stores additional context about your documents that won’t be indexed for search. This is useful for data you want to retrieve with your search results but don’t need to search through.
Use Content When | Use Metadata When |
---|---|
Users need to search for this information | Information is for display/reference only (e.g. IDs) |
The field is important for finding relevant documents | The field provides context after finding documents |
You want to filter results by this field | You need to track internal system information |
How to use content and metadata fields in your documents
The content
field contains the searchable data of your documents. This is what gets indexed and can be queried.
content
when upserting documentsThe metadata
field stores additional context about your documents that won’t be indexed for search. This is useful for data you want to retrieve with your search results but don’t need to search through.
Use Content When | Use Metadata When |
---|---|
Users need to search for this information | Information is for display/reference only (e.g. IDs) |
The field is important for finding relevant documents | The field provides context after finding documents |
You want to filter results by this field | You need to track internal system information |