If you don't store the source, then you need to explicitly store specific fields (and ask for them in the search request) if you want them. It usually makes sense to use the _source field then storing specific fields separately.
On Saturday, June 4, 2011 at 5:55 PM, slavag wrote:
Hi,
I'm trying to disable _source field, using this:
XContentBuilder data = jsonBuilder().startObject()
.startObject("type")
.startObject("_source")
.field("enabled", false)
.endObject()
.endObject()
.endObject();
client.admin().indices().ccreate(new
CreateIndexRequest("index").mapping("type", data ));
And looks like _source is indeed not stored.
Hi Shay, thank for a quick response,
What do you mean when saying to explicitly store specific fields , I'm
putting them into to JsonBuilder (in the search I do ask for them) ?
If you don't store the source, then you need to explicitly store specific fields (and ask for them in the search request) if you want them. It usually makes sense to use the _source field then storing specific fields separately.
On Saturday, June 4, 2011 at 5:55 PM, slavag wrote:
Hi,
I'm trying to disable _source field, using this:
XContentBuilder data = jsonBuilder().startObject()
.startObject("type")
.startObject("_source")
.field("enabled", false)
.endObject()
.endObject()
.endObject();
client.admin().indices().ccreate(new
CreateIndexRequest("index").mapping("type", data ));
And looks like _source is indeed not stored.
You need to set store to yes in hte mapping for the relevant fields you want to retrieve. Check the mappings section in the guide.
On Saturday, June 4, 2011 at 9:09 PM, slavag wrote:
Hi Shay, thank for a quick response,
What do you mean when saying to explicitly store specific fields , I'm
putting them into to JsonBuilder (in the search I do ask for them) ?
If you don't store the source, then you need to explicitly store specific fields (and ask for them in the search request) if you want them. It usually makes sense to use the _source field then storing specific fields separately.
On Saturday, June 4, 2011 at 5:55 PM, slavag wrote:
Hi,
I'm trying to disable _source field, using this:
XContentBuilder data = jsonBuilder().startObject()
.startObject("type")
.startObject("_source")
.field("enabled", false)
.endObject()
.endObject()
.endObject();
client.admin().indices().ccreate(new
CreateIndexRequest("index").mapping("type", data ));
And looks like _source is indeed not stored.
That what I'm trying to understand, I read this section and still
confused, when I'm using such mapping (not dynamic) and then new
fields are cumming - it means I need explicitly to create a mapping
for them ? Or there other way to make mapping dynamic after once I
used static mapping (for _source).
You need to set store to yes in hte mapping for the relevant fields you want to retrieve. Check the mappings section in the guide.
On Saturday, June 4, 2011 at 9:09 PM, slavag wrote:
Hi Shay, thank for a quick response,
What do you mean when saying to explicitly store specific fields , I'm
putting them into to JsonBuilder (in the search I do ask for them) ?
If you don't store the source, then you need to explicitly store specific fields (and ask for them in the search request) if you want them. It usually makes sense to use the _source field then storing specific fields separately.
On Saturday, June 4, 2011 at 5:55 PM, slavag wrote:
Hi,
I'm trying to disable _source field, using this:
XContentBuilder data = jsonBuilder().startObject()
.startObject("type")
.startObject("_source")
.field("enabled", false)
.endObject()
.endObject()
.endObject();
client.admin().indices().ccreate(new
CreateIndexRequest("index").mapping("type", data ));
And looks like _source is indeed not stored.
On Saturday, June 4, 2011 at 9:19 PM, slavag wrote:
That what I'm trying to understand, I read this section and still
confused, when I'm using such mapping (not dynamic) and then new
fields are cumming - it means I need explicitly to create a mapping
for them ? Or there other way to make mapping dynamic after once I
used static mapping (for _source).
You need to set store to yes in hte mapping for the relevant fields you want to retrieve. Check the mappings section in the guide.
On Saturday, June 4, 2011 at 9:09 PM, slavag wrote:
Hi Shay, thank for a quick response,
What do you mean when saying to explicitly store specific fields , I'm
putting them into to JsonBuilder (in the search I do ask for them) ?
If you don't store the source, then you need to explicitly store specific fields (and ask for them in the search request) if you want them. It usually makes sense to use the _source field then storing specific fields separately.
On Saturday, June 4, 2011 at 5:55 PM, slavag wrote:
Hi,
I'm trying to disable _source field, using this:
XContentBuilder data = jsonBuilder().startObject()
.startObject("type")
.startObject("_source")
.field("enabled", false)
.endObject()
.endObject()
.endObject();
client.admin().indices().ccreate(new
CreateIndexRequest("index").mapping("type", data ));
And looks like _source is indeed not stored.
On Saturday, June 4, 2011 at 9:19 PM, slavag wrote:
That what I'm trying to understand, I read this section and still
confused, when I'm using such mapping (not dynamic) and then new
fields are cumming - it means I need explicitly to create a mapping
for them ? Or there other way to make mapping dynamic after once I
used static mapping (for _source).
You need to set store to yes in hte mapping for the relevant fields you want to retrieve. Check the mappings section in the guide.
On Saturday, June 4, 2011 at 9:09 PM, slavag wrote:
Hi Shay, thank for a quick response,
What do you mean when saying to explicitly store specific fields , I'm
putting them into to JsonBuilder (in the search I do ask for them) ?
If you don't store the source, then you need to explicitly store specific fields (and ask for them in the search request) if you want them. It usually makes sense to use the _source field then storing specific fields separately.
On Saturday, June 4, 2011 at 5:55 PM, slavag wrote:
Hi,
I'm trying to disable _source field, using this:
XContentBuilder data = jsonBuilder().startObject()
.startObject("type")
.startObject("_source")
.field("enabled", false)
.endObject()
.endObject()
.endObject();
client.admin().indices().ccreate(new
CreateIndexRequest("index").mapping("type", data ));
And looks like _source is indeed not stored.
On Saturday, June 4, 2011 at 9:19 PM, slavag wrote:
That what I'm trying to understand, I read this section and still
confused, when I'm using such mapping (not dynamic) and then new
fields are cumming - it means I need explicitly to create a mapping
for them ? Or there other way to make mapping dynamic after once I
used static mapping (for _source).
You need to set store to yes in hte mapping for the relevant fields you want to retrieve. Check the mappings section in the guide.
On Saturday, June 4, 2011 at 9:09 PM, slavag wrote:
Hi Shay, thank for a quick response,
What do you mean when saying to explicitly store specific fields , I'm
putting them into to JsonBuilder (in the search I do ask for them) ?
If you don't store the source, then you need to explicitly store specific fields (and ask for them in the search request) if you want them. It usually makes sense to use the _source field then storing specific fields separately.
On Saturday, June 4, 2011 at 5:55 PM, slavag wrote:
Hi,
I'm trying to disable _source field, using this:
XContentBuilder data = jsonBuilder().startObject()
.startObject("type")
.startObject("_source")
.field("enabled", false)
.endObject()
.endObject()
.endObject();
client.admin().indices().ccreate(new
CreateIndexRequest("index").mapping("type", data ));
And looks like _source is indeed not stored.
On Saturday, June 4, 2011 at 9:19 PM, slavag wrote:
That what I'm trying to understand, I read this section and still
confused, when I'm using such mapping (not dynamic) and then new
fields are cumming - it means I need explicitly to create a mapping
for them ? Or there other way to make mapping dynamic after once I
used static mapping (for _source).
You need to set store to yes in hte mapping for the relevant fields you want to retrieve. Check the mappings section in the guide.
On Saturday, June 4, 2011 at 9:09 PM, slavag wrote:
Hi Shay, thank for a quick response,
What do you mean when saying to explicitly store specific fields , I'm
putting them into to JsonBuilder (in the search I do ask for them) ?
If you don't store the source, then you need to explicitly store specific fields (and ask for them in the search request) if you want them. It usually makes sense to use the _source field then storing specific fields separately.
On Saturday, June 4, 2011 at 5:55 PM, slavag wrote:
Hi,
I'm trying to disable _source field, using this:
XContentBuilder data = jsonBuilder().startObject()
.startObject("type")
.startObject("_source")
.field("enabled", false)
.endObject()
.endObject()
.endObject();
client.admin().indices().ccreate(new
CreateIndexRequest("index").mapping("type", data ));
And looks like _source is indeed not stored.
On Saturday, June 4, 2011 at 9:19 PM, slavag wrote:
That what I'm trying to understand, I read this section and still
confused, when I'm using such mapping (not dynamic) and then new
fields are cumming - it means I need explicitly to create a mapping
for them ? Or there other way to make mapping dynamic after once I
used static mapping (for _source).
You need to set store to yes in hte mapping for the relevant fields you want to retrieve. Check the mappings section in the guide.
On Saturday, June 4, 2011 at 9:09 PM, slavag wrote:
Hi Shay, thank for a quick response,
What do you mean when saying to explicitly store specific fields , I'm
putting them into to JsonBuilder (in the search I do ask for them) ?
If you don't store the source, then you need to explicitly store specific fields (and ask for them in the search request) if you want them. It usually makes sense to use the _source field then storing specific fields separately.
On Saturday, June 4, 2011 at 5:55 PM, slavag wrote:
Hi,
I'm trying to disable _source field, using this:
XContentBuilder data = jsonBuilder().startObject()
.startObject("type")
.startObject("_source")
.field("enabled", false)
.endObject()
.endObject()
.endObject();
client.admin().indices().ccreate(new
CreateIndexRequest("index").mapping("type", data ));
And looks like _source is indeed not stored.
Last question, to make a compression on _source, should I also use
"static" mapping or default-mapping.json or there other way so tell to
elasticsearch to compress it ?
On Saturday, June 4, 2011 at 9:19 PM, slavag wrote:
That what I'm trying to understand, I read this section and still
confused, when I'm using such mapping (not dynamic) and then new
fields are cumming - it means I need explicitly to create a mapping
for them ? Or there other way to make mapping dynamic after once I
used static mapping (for _source).
You need to set store to yes in hte mapping for the relevant fields you want to retrieve. Check the mappings section in the guide.
On Saturday, June 4, 2011 at 9:09 PM, slavag wrote:
Hi Shay, thank for a quick response,
What do you mean when saying to explicitly store specific fields , I'm
putting them into to JsonBuilder (in the search I do ask for them) ?
If you don't store the source, then you need to explicitly store specific fields (and ask for them in the search request) if you want them. It usually makes sense to use the _source field then storing specific fields separately.
On Saturday, June 4, 2011 at 5:55 PM, slavag wrote:
Hi,
I'm trying to disable _source field, using this:
XContentBuilder data = jsonBuilder().startObject()
.startObject("type")
.startObject("_source")
.field("enabled", false)
.endObject()
.endObject()
.endObject();
client.admin().indices().ccreate(new
CreateIndexRequest("index").mapping("type", data ));
And looks like _source is indeed not stored.
You can use the default-mapping.json option, but then you need to apply it to all nodes. Another option is to use index template, and have the default mapping type applied with compression to source (which is more of an API way to do it).
On Saturday, June 4, 2011 at 9:31 PM, slavag wrote:
Ok, may be I'm wrong.
Last question, to make a compression on _source, should I also use
"static" mapping or default-mapping.json or there other way so tell to
elasticsearch to compress it ?
On Saturday, June 4, 2011 at 9:19 PM, slavag wrote:
That what I'm trying to understand, I read this section and still
confused, when I'm using such mapping (not dynamic) and then new
fields are cumming - it means I need explicitly to create a mapping
for them ? Or there other way to make mapping dynamic after once I
used static mapping (for _source).
You need to set store to yes in hte mapping for the relevant fields you want to retrieve. Check the mappings section in the guide.
On Saturday, June 4, 2011 at 9:09 PM, slavag wrote:
Hi Shay, thank for a quick response,
What do you mean when saying to explicitly store specific fields , I'm
putting them into to JsonBuilder (in the search I do ask for them) ?
If you don't store the source, then you need to explicitly store specific fields (and ask for them in the search request) if you want them. It usually makes sense to use the _source field then storing specific fields separately.
On Saturday, June 4, 2011 at 5:55 PM, slavag wrote:
Hi,
I'm trying to disable _source field, using this:
XContentBuilder data = jsonBuilder().startObject()
.startObject("type")
.startObject("_source")
.field("enabled", false)
.endObject()
.endObject()
.endObject();
client.admin().indices().ccreate(new
CreateIndexRequest("index").mapping("type", data ));
And looks like _source is indeed not stored.
You can use the default-mapping.json option, but then you need to apply it to all nodes. Another option is to use index template, and have the default mapping type applied with compression to source (which is more of an API way to do it).
On Saturday, June 4, 2011 at 9:31 PM, slavag wrote:
Ok, may be I'm wrong.
Last question, to make a compression on _source, should I also use
"static" mapping or default-mapping.json or there other way so tell to
elasticsearch to compress it ?
On Saturday, June 4, 2011 at 9:19 PM, slavag wrote:
That what I'm trying to understand, I read this section and still
confused, when I'm using such mapping (not dynamic) and then new
fields are cumming - it means I need explicitly to create a mapping
for them ? Or there other way to make mapping dynamic after once I
used static mapping (for _source).
You need to set store to yes in hte mapping for the relevant fields you want to retrieve. Check the mappings section in the guide.
On Saturday, June 4, 2011 at 9:09 PM, slavag wrote:
Hi Shay, thank for a quick response,
What do you mean when saying to explicitly store specific fields , I'm
putting them into to JsonBuilder (in the search I do ask for them) ?
If you don't store the source, then you need to explicitly store specific fields (and ask for them in the search request) if you want them. It usually makes sense to use the _source field then storing specific fields separately.
On Saturday, June 4, 2011 at 5:55 PM, slavag wrote:
Hi,
I'm trying to disable _source field, using this:
XContentBuilder data = jsonBuilder().startObject()
.startObject("type")
.startObject("_source")
.field("enabled", false)
.endObject()
.endObject()
.endObject();
client.admin().indices().ccreate(new
CreateIndexRequest("index").mapping("type", data ));
And looks like _source is indeed not stored.
You can use the default-mapping.json option, but then you need to apply it to all nodes. Another option is to use index template, and have the default mapping type applied with compression to source (which is more of an API way to do it).
On Saturday, June 4, 2011 at 9:31 PM, slavag wrote:
Ok, may be I'm wrong.
Last question, to make a compression on _source, should I also use
"static" mapping or default-mapping.json or there other way so tell to
elasticsearch to compress it ?
On Saturday, June 4, 2011 at 9:19 PM, slavag wrote:
That what I'm trying to understand, I read this section and still
confused, when I'm using such mapping (not dynamic) and then new
fields are cumming - it means I need explicitly to create a mapping
for them ? Or there other way to make mapping dynamic after once I
used static mapping (for _source).
You need to set store to yes in hte mapping for the relevant fields you want to retrieve. Check the mappings section in the guide.
On Saturday, June 4, 2011 at 9:09 PM, slavag wrote:
Hi Shay, thank for a quick response,
What do you mean when saying to explicitly store specific fields , I'm
putting them into to JsonBuilder (in the search I do ask for them) ?
If you don't store the source, then you need to explicitly store specific fields (and ask for them in the search request) if you want them. It usually makes sense to use the _source field then storing specific fields separately.
On Saturday, June 4, 2011 at 5:55 PM, slavag wrote:
Hi,
I'm trying to disable _source field, using this:
XContentBuilder data = jsonBuilder().startObject()
.startObject("type")
.startObject("_source")
.field("enabled", false)
.endObject()
.endObject()
.endObject();
client.admin().indices().ccreate(new
CreateIndexRequest("index").mapping("type", data ));
And looks like _source is indeed not stored.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.