Web / Apache Solr Interview questions
What is the difference between stored and indexed fields in Solr?
Indexed and stored are independent boolean attributes on a field, and mixing them up is a common source of confusing search behavior.
| indexed="true" | stored="true" |
| Field is analyzed and added to the inverted index so it can be searched or faceted on | Field's original value is kept and returned in query results |
| Does not affect what's returned in the response | Does not affect whether the field is searchable |
A field can be indexed but not stored (searchable, never returned - saves disk space), stored but not indexed (returned but not searchable, like an internal note), or both. Getting this wrong often shows up as "I can search it but the field is missing from results" or the reverse.
More Related questions...