"indexed" and "stored" are independent, orthogonal attributes - you can use any of the four combinations of true and false. "indexed" is used for search or query, the "lookup" portion of processing a query request. Once the search/query/lookup is complete and a set of documents is selected, "stored" is the set of fields whose values are available for display or return with the Solr response.

Part of the reason for the separation is that Solr/Lucene "analyzes" or transforms the input data into a more efficient form for faster and more relevant search/lookup. Unfortunately, that analyzed/transformed data is frequently no longer suitable for display and human consumption. In other words the analysis/transformation is not bidirectional/reversible. Setting "stored=true" guarantees that the original data can be retrieved in its original form.

-- Jack Krupansky

-----Original Message----- From: Giovanni Gherdovich
Sent: Saturday, June 30, 2012 8:57 AM
To: solr-user@lucene.apache.org
Subject: difference between stored="false" and stored="true" ?

Hi all,

when declaring a field in the schema.xml file you can
set the attributes 'indexed' and 'stored' to "true" or "false".

What is the difference between a <indexed="true" stored="false">
and a <indexed="true" stored="true">?

I guess understanding this would require me to have
a closer look to lucene's index data structures;
what's the pointer to some doc I can read?

Cheers,
GGhh

Reply via email to