Optimize storage space with "include_in_all": true, "index": "no"


(Max Melentiev) #1

As I understood, there is separate index (lucene indexed field) for each
indexed field in document.

So should be there storage improvement if I implicitly set
"include_in_all": true while
setting "index": "no" for all fields which I don't want search directly?

Thanks.

--


(Radu Gheorghe) #2

Hello Max,

Yes, you'd save some space if you do that. But please note that you
would have to explicitly turn on "include_in_all" in this case. Take a
look here:

It should work as expected: no results when you query "foo", with
results with "_all".

But if you omit the "include_in_all" part of the mapping, you'd see
that the _all query will fail to. At least for me it does on 0.19.11

Best regards,
Radu

http://sematext.com/ -- ElasticSearch -- Solr -- Lucene

On Tue, Oct 30, 2012 at 4:02 PM, Max Melentiev printercu@gmail.com wrote:

As I understood, there is separate index (lucene indexed field) for each
indexed field in document.

So should be there storage improvement if I implicitly set "include_in_all":
true while
setting "index": "no" for all fields which I don't want search directly?

Thanks.

--

--


(Max Melentiev) #3

Thanks, Radu!

But it seems there is no facility to set up this for all fields in root
object by default.
Am I right?

On Tuesday, October 30, 2012 9:46:49 PM UTC+6, Radu Gheorghe wrote:

Hello Max,

Yes, you'd save some space if you do that. But please note that you
would have to explicitly turn on "include_in_all" in this case. Take a
look here:
https://gist.github.com/3980928

It should work as expected: no results when you query "foo", with
results with "_all".

But if you omit the "include_in_all" part of the mapping, you'd see
that the _all query will fail to. At least for me it does on 0.19.11

Best regards,
Radu

http://sematext.com/ -- ElasticSearch -- Solr -- Lucene

On Tue, Oct 30, 2012 at 4:02 PM, Max Melentiev <prin...@gmail.com<javascript:>>
wrote:

As I understood, there is separate index (lucene indexed field) for each
indexed field in document.

So should be there storage improvement if I implicitly set
"include_in_all":
true while
setting "index": "no" for all fields which I don't want search directly?

Thanks.

--

--


(Igor Motov) #4

You can define a dynamic templatehttp://www.elasticsearch.org/guide/reference/mapping/root-object-type.html that
would specify settings for all dynamically created fields.

On Tuesday, October 30, 2012 10:38:22 PM UTC-4, Max Melentiev wrote:

Thanks, Radu!

But it seems there is no facility to set up this for all fields in root
object by default.
Am I right?

On Tuesday, October 30, 2012 9:46:49 PM UTC+6, Radu Gheorghe wrote:

Hello Max,

Yes, you'd save some space if you do that. But please note that you
would have to explicitly turn on "include_in_all" in this case. Take a
look here:
https://gist.github.com/3980928

It should work as expected: no results when you query "foo", with
results with "_all".

But if you omit the "include_in_all" part of the mapping, you'd see
that the _all query will fail to. At least for me it does on 0.19.11

Best regards,
Radu

http://sematext.com/ -- ElasticSearch -- Solr -- Lucene

On Tue, Oct 30, 2012 at 4:02 PM, Max Melentiev prin...@gmail.com
wrote:

As I understood, there is separate index (lucene indexed field) for
each
indexed field in document.

So should be there storage improvement if I implicitly set
"include_in_all":
true while
setting "index": "no" for all fields which I don't want search
directly?

Thanks.

--

--


(Max Melentiev) #5

Great!, that's it! Thanks Igor!

On Wednesday, October 31, 2012 5:48:27 PM UTC+6, Igor Motov wrote:

You can define a dynamic templatehttp://www.elasticsearch.org/guide/reference/mapping/root-object-type.html that
would specify settings for all dynamically created fields.

On Tuesday, October 30, 2012 10:38:22 PM UTC-4, Max Melentiev wrote:

Thanks, Radu!

But it seems there is no facility to set up this for all fields in root
object by default.
Am I right?

On Tuesday, October 30, 2012 9:46:49 PM UTC+6, Radu Gheorghe wrote:

Hello Max,

Yes, you'd save some space if you do that. But please note that you
would have to explicitly turn on "include_in_all" in this case. Take a
look here:
https://gist.github.com/3980928

It should work as expected: no results when you query "foo", with
results with "_all".

But if you omit the "include_in_all" part of the mapping, you'd see
that the _all query will fail to. At least for me it does on 0.19.11

Best regards,
Radu

http://sematext.com/ -- ElasticSearch -- Solr -- Lucene

On Tue, Oct 30, 2012 at 4:02 PM, Max Melentiev prin...@gmail.com
wrote:

As I understood, there is separate index (lucene indexed field) for
each
indexed field in document.

So should be there storage improvement if I implicitly set
"include_in_all":
true while
setting "index": "no" for all fields which I don't want search
directly?

Thanks.

--

--


(system) #6