Giovanni Gherdovich | 30 Jun 2012 15:57
Picon
Gravatar

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

Jack Krupansky | 30 Jun 2012 16:07
Gravatar

Re: difference between stored="false" and stored="true" ?

"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 <at> 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">?
(Continue reading)

François Schiettecatte | 30 Jun 2012 16:10
Picon
Gravatar

Re: difference between stored="false" and stored="true" ?

Giovanni

<stored="true"> means the data is stored in the index and can be returned with the search results (see the
'fl' parameter). This is independent of <indexed=..>

Which means that you can store but not index a field:
	
	<indexed="false" stored="true">

Best regards

François

On Jun 30, 2012, at 9:57 AM, Giovanni Gherdovich wrote:

> 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

(Continue reading)

Giovanni Gherdovich | 30 Jun 2012 20:01
Picon
Gravatar

Re: difference between stored="false" and stored="true" ?

Thank you François and Jack for those explainations.

Cheers,
GGhh

2012/6/30 François Schiettecatte:
> Giovanni
>
> <stored="true"> means the data is stored in the index and [...]

2012/6/30 Jack Krupansky:
> "indexed" and "stored" are independent [...]

Amit Nithian | 4 Jul 2012 07:54
Picon

Re: difference between stored="false" and stored="true" ?

So couple questions on this (comment first then question):
1) I guess you can't have four combinations b/c
index=false/stored=false has no meaning?
2) If you set less fields stored=true does this reduce the memory
footprint for the document cache? Or better yet, I can store more
documents in the cache possibly increasing my cache efficiency?

I read about the lazy loading of fields which seems like a good way to
maximize the cache and gain the advantage of storing data in Solr too.

Thanks
Amit

On Sat, Jun 30, 2012 at 11:01 AM, Giovanni Gherdovich
<g.gherdovich <at> gmail.com> wrote:
> Thank you François and Jack for those explainations.
>
> Cheers,
> GGhh
>
> 2012/6/30 François Schiettecatte:
>> Giovanni
>>
>> <stored="true"> means the data is stored in the index and [...]
>
>
> 2012/6/30 Jack Krupansky:
>> "indexed" and "stored" are independent [...]

(Continue reading)

Jack Krupansky | 4 Jul 2012 18:14
Gravatar

Re: difference between stored="false" and stored="true" ?

1. The "useless" combination of stored=false and indexed=false is useful to 
"ignore" fields. You might have input data which has fields that you have 
decided to ignore.

2. Stored fields take up memory for documents (fields) to be returned for 
search results in the Solr query response, so fewer stored fields is better 
for performance and memory usage.

-- Jack Krupansky

-----Original Message----- 
From: Amit Nithian
Sent: Wednesday, July 04, 2012 12:54 AM
To: solr-user <at> lucene.apache.org
Subject: Re: difference between stored="false" and stored="true" ?

So couple questions on this (comment first then question):
1) I guess you can't have four combinations b/c
index=false/stored=false has no meaning?
2) If you set less fields stored=true does this reduce the memory
footprint for the document cache? Or better yet, I can store more
documents in the cache possibly increasing my cache efficiency?

I read about the lazy loading of fields which seems like a good way to
maximize the cache and gain the advantage of storing data in Solr too.

Thanks
Amit

On Sat, Jun 30, 2012 at 11:01 AM, Giovanni Gherdovich
(Continue reading)


Gmane