Ivan, thanks!
Please could you help me a little bit more. The concepts here are a
bit complicated.
This is what I have:
BulkRequestBuilder builder = tClient.prepareBulk();
... (code to add documents to the builder)
response = builder.execute().actionGet();
UpdateSettingsRequestBuilder usrb =
client.admin().indices().prepareUpdateSettings(index);
usrb.setSettings( " { "theindex" : { "_source" : {"enabled" :
false} } } "); <-- Problem?
usrb.execute().actionGet();
The marked line is where I think things are going wrong, not that I
get any sort of error to indicate so. I'd like to know, also, since
I'm loading quite a few documents, would it not make sense to make
this part of the bulk-request? In other words don't store the data to
begin with. What I'm thinking of is something more towards the
Field.Store.NO property (of Lucene) that I can set for every field
separately. I'd like to do this programmatically as well, i.e. not
with JSON commands if I don't have to.
Thanks for the effort.
On Feb 9, 11:31 pm, Ivan Brusic i...@brusic.com wrote:
Hi Thinus,
Try using updateSettings on the IndicesAdminClient with the relevant settings.
--
IvanOn Thu, Feb 9, 2012 at 8:38 AM, Thinus Prinsloo
thinus.prins...@gmail.com wrote:
I would like to disable saving the source with the indexes, but do it
through the Java API. I believe the method to do it with JSON would
be to use the "_source" : {"enabled" : false} idea with the field, but
I do not know how to do this with the API. Thank you!