Open boliza opened 6 years ago
link #805
if (useExternalMappings) {
try {
//We check if the externalMapping have the property 'key'
final IndexMapping mappings = client.getMapping(indexStoreName, store);
if (mappings == null || (!mappings.isDynamic() && !mappings.getProperties().containsKey(key))) {
//Error if it is not dynamic and have not the property 'key'
throw new PermanentBackendException("The external mapping for index '"+ indexStoreName
+ "' and type '" + store + "' do not have property '" + key + "'");
} else if (mappings.isDynamic()) {
//If it is dynamic, we push the unknown property 'key'
this.pushMapping(store, key, information);
}
} catch (final IOException e) {
throw new PermanentBackendException(e);
}
}
if useExternalMappings
is true
will first to get Mapping, so will produce
Caused by: org.elasticsearch.client.ResponseException: method [GET], host [http://127.0.0.1:9200], URI [/janusgraph_vertices/_mapping/vertices], status line [HTTP/1.1 404 Not Found]
{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index","resource.type":"index_or_alias","resource.id":"janusgraph_vertices","index_uuid":"_na_","index":"janusgraph_vertices"}],"type":"index_not_found_exception","reason":"no such index","resource.type":"index_or_alias","resource.id":"janusgraph_vertices","index_uuid":"_na_","index":"janusgraph_vertices"},"status":404}
Ok the error is not explicit, because the error is not well catch. But then you use external mapping you should push you index first in ES. Use-external-mapping should be used when you want to customized your ES mapping.
OK. Close this after add more document to explain this?
I got the same exception and can't find the solution even after reading your issue carefully. Could you give some more details? Thinks
Oh... The same problem has bothered me for a long time. My conf properties file was following:
index.search.index-name=test_IMPORT
When I executed run.sh by janusgraph-utils , i got :
parse GSON failed: Could not register new index field with index backend
After repeated retries, I found that the problem lies in the index name, and uppercase letters cannot be used. When I modify index.search.index-name=test_import, everything is ok.
Configuration:
Env: