dantuff
(Dan Tuffery)
February 25, 2014, 5:05pm
1
I'm migrating to 1.0.0 and a few of my queries are broken because I am
using the 'fields' parameter. I understand I need to use source filtering
as per the link below but his there support for source filtering using the
Java AP yetI?
http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-request-source-filtering.html
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b65acf48-c13d-4d64-ad4b-a95aa47b89c9%40googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
Binh_Ly_2
(Binh Ly-2)
February 25, 2014, 8:41pm
2
Yes you can use the client.setFetchSource() method:
SearchResponse response = client.prepareSearch("index")
.setFetchSource(new String[] {"field1", "field2"}, null)
.execute()
.actionGet();
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/0de2a992-2397-476d-8a96-345026b60aae%40googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
dantuff
(Dan Tuffery)
February 25, 2014, 9:22pm
3
Thanks for your response.I can't see the method 'setFetchSource' in the
Client class. Are you sure that is in 1.0.0?
On Tuesday, February 25, 2014 8:41:37 PM UTC, Binh Ly wrote:
Yes you can use the client.setFetchSource() method:
SearchResponse response = client.prepareSearch("index")
.setFetchSource(new String[] {"field1", "field2"}, null)
.execute()
.actionGet();
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/d9b1aa0b-80f8-49a8-9f50-5e54db05562c%40googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
Binh_Ly_2
(Binh Ly-2)
February 25, 2014, 10:23pm
4
Hmmm, can please double-check. I can see it from the tests here:
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.search.source;
This file has been truncated. show original
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a0676082-5638-4f16-b5b7-76fb42ac2a5e%40googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
dantuff
(Dan Tuffery)
February 25, 2014, 10:49pm
5
Yes, I can see it. Thanks.
On 25 Feb 2014, at 22:23, Binh Ly binhly_es@yahoo.com wrote:
Hmmm, can please double-check. I can see it from the tests here:
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a0676082-5638-4f16-b5b7-76fb42ac2a5e%40googlegroups.com .
For more options, visit https://groups.google.com/groups/opt_out .
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/9E1DEA66-32A9-4AFC-B0EB-C5507A72B266%40gmail.com .
For more options, visit https://groups.google.com/groups/opt_out .