Optimizing Solr schema and indexing
Apache Solr schema can also be optimized for reducing the overall footprint of your index and to speed up the search. Let's take a look at some of the possible optimizations.
Stored fields
The schema.xml
file also provides a configuration to define whether a field needs to be stored as an optional attribute (stored=true
/false
). Typically, the fields are stored so that their values can be displayed as search results in the search results page. However, if the size of the fields is large, it unnecessarily increases the size of the index, eating up Solr's memory. For large fields, it is better to store their identifiers and let the search client be responsible for rendering the result; fire a query to another system ...
Get Scaling Apache Solr now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.