The text scrap is below. The 'isExists()' code section was originally
'exists()', but that IS a valid change. It wouldn't compile even until
that was changed. Now, at the point this is called, USUALLY, there is an
index already created. The code is NOT creating an index, however. I don't
THINK that the error I listed in the JUNIT test should say method does't
exist if it fails! I'm still trying to figure out why the index is not
being created.
(by the way, this is part of an 'osemhttp://www.compass-project.org/docs/latest/reference/html/core-osem.html'
project) It was working fine on Java 1.6, ESearch 19.6.
private void ensureIndex(Class<?> clazz) {
if (indexNames.containsKey(clazz))
return;
client.getClient().admin().cluster().prepareHealth()
.setWaitForYellowStatus().execute().actionGet();
String name = getIndexName(clazz);
if
(!client.getClient().admin().indices().prepareExists(name).execute()
.actionGet().isExists()) {
client.getClient().admin().indices().prepareCreate(name).execute()
.actionGet();
}
Map<String, Object> src = toObjectType(name,
toObjectType("properties", getMapping(clazz), null), null);
client.getClient().admin().indices().preparePutMapping(name)
.setType(name).setIndices(name).setSource(src).execute()
.actionGet();
indexNames.put(clazz, name);
}
On Wednesday, October 9, 2013 12:17:07 PM UTC-7, Ivan Brusic wrote:
That method doesn't seem to have changed. I still see it:
https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/client/IndicesAdminClient.java#L147
Can you post a code fragment in case something is being overlooked?
BTW, are you using an IDE? Code completion really helps when transitioning
between libraries/APIs.
Cheers,
Ivan
On Wed, Oct 9, 2013 at 12:07 PM, Dennis <gea...@gmail.com <javascript:>>wrote:
I'm getting the following error:
java.lang.NoSuchMethodError: org.elasticsearch.client.IndicesAdminClient.
prepareExists([Ljava/lang/String;)Lorg/elasticsearch/action/admin/indices
/exists/IndicesExistsRequestBuilder;
The code producing this was originally writtenfor ESearch 19.6 and am no
recompiling it for 90.5 version.
At this link: grepcode.com search for that method in version 90.5http://grepcode.com/file/repo1.maven.org/maven2/org.elasticsearch/elasticsearch/0.90.5/org/elasticsearch/client/IndicesAdminClient.java#IndicesAdminClient.prepareExists(java.lang.String[]),
it doesn't show that method.
How do I replace this code? (I am just getting up to speed on this
project: It's my project, but I hired out the various parts, and we're
getting ready to launch and upgrading all the software first).
--
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 elasticsearc...@googlegroups.com <javascript:>.
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.
For more options, visit https://groups.google.com/groups/opt_out.