Hi there,
I have some trouble while playing with ES.
I push an entity (a bit complex) to a clean ES :
ESTestCase.java
package fr.pilato.hibernate.plugins.elasticsearch;
import static org.elasticsearch.index.query.xcontent.QueryBuilders.termQuery;
import static org.elasticsearch.node.NodeBuilder.nodeBuilder;
import static org.junit.Assert.assertEquals;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.SearchType;
import org.elasticsearch.client.Client;
import org.junit.Test;
This file has been truncated. show original
StackTrace.txt
Failed :
org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [dfs], total failure; shardFailures {[1IOMpS32QuSLMWkQkGG4iQ][test][0]: RemoteTransportException[[Lord Dark Wind][inet[/10.115.1.111:9300]][search/phase/dfs]]; nested: SearchParseException[[test][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: RuntimeException[Internal error: this code path should never get executed]; }{[1IOMpS32QuSLMWkQkGG4iQ][test][2]: RemoteTransportException[[Lord Dark Wind][inet[/10.115.1.111:9300]][search/phase/dfs]]; nested: SearchParseException[[test][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: RuntimeException[Internal error: this code path should never get executed]; }{[1IOMpS32QuSLMWkQkGG4iQ][test][3]: RemoteTransportException[[Lord Dark Wind][inet[/10.115.1.111:9300]][search/phase/dfs]]; nested: SearchParseException[[test][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: RuntimeException[Internal error: this code path should never get executed]; }{[1IOMpS32QuSLMWkQkGG4iQ][test][1]: RemoteTransportException[[Lord Dark Wind][inet[/10.115.1.111:9300]][search/phase/dfs]]; nested: SearchParseException[[test][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: RuntimeException[Internal error: this code path should never get executed]; }{[1IOMpS32QuSLMWkQkGG4iQ][test][4]: RemoteTransportException[[Lord Dark Wind][inet[/10.115.1.111:9300]][search/phase/dfs]]; nested: SearchParseException[[test][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: RuntimeException[Internal error: this code path should never get executed]; }
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:248)
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.access$400(TransportSearchTypeAction.java:75)
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$3.onFailure(TransportSearchTypeAction.java:198)
at org.elasticsearch.search.action.SearchServiceTransportAction$1.handleException(SearchServiceTransportAction.java:119)
at org.elasticsearch.transport.netty.MessageChannelHandler.handleException(MessageChannelHandler.java:158)
at org.elasticsearch.transport.netty.MessageChannelHandler.handlerResponseError(MessageChannelHandler.java:149)
at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:100)
at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
This file has been truncated. show original
index.sh
curl -XPUT http://localhost:9200/test/dossier/1 -d '{"conformite":"CONFORME", "direction":"DIRECTION", "domaine":{"reglementationsConcernees":["REG"], "supportsDeclaratifsForES":[{"SupportDeclaratif":{"specificite":{"SpecifSDec":{"regime":"1234"}}, "typesVerifications":["DOC"], "controlesPhysiques":[{"ControleMarchandise":{"conclusions":[{"Conclusion":{"reconnu":"1", "typePrecision":"VIDE", "conclusionCtrl":"CONFORME", "declare":"1", "typeAttributMarchandise":"NOMENCLATURE"}}, {"Conclusion":{"reconnu":"586.0", "typePrecision":"VIDE", "conclusionCtrl":"CONFORME", "declare":"586.0", "typeAttributMarchandise":"MASSE_NETTE"}}]}}], "bureauDouane":{"ServiceAdministrationDouane":{"europa":"FR00000", "nom":"Bureau"}}, "conclusion":"null", "infractions":[], "date":"2011-04-01T08:00:00.000+0000", "reference":"11111", "controlesDocumentaires":[{"ControleDocument":{"categorieLibelle":"Libelle", "typePrecision":"null", "categorieCode":"9999", "typeConclusionControle":"CONFORME"}}, {"ControleDocument":{"categorieLibelle":"Facture", "typePrecision":"null", "categorieCode":"8888", "typeConclusionControle":"CONFORME"}}]}}]}, "type":"DOUANE", "sources":[{"type":"CRIT"}], "dateDebut":"2011-04-01T10:00:00.000+0000", "etat":"VALIDE", "agentsRoles":[{"personne":{"Agent":{"nom":"MOI", "personnesIdentifiantsForES":[{"identifiant":"login"}]}}, "typesRoles":["REDACTEUR"]}], "lieuControle":"Bureau", "service":{"ServiceAdministrationDouane":{"europa":"FR00000", "nom":"Bureau"}}, "personnesControlees":[{"personne":{"PersonneMorale":{"nom":"MYCOMP", "personnesIdentifiantsForES":[{"identifiant":"MYEORI"}, {"identifiant":"MYSIRET"}]}}, "role":"DECLARANT"}], "identifiant":"66566767"}'
There are more than three files. show original
It works.
Then, I search it with curl :
ESTestCase.java
package fr.pilato.hibernate.plugins.elasticsearch;
import static org.elasticsearch.index.query.xcontent.QueryBuilders.termQuery;
import static org.elasticsearch.node.NodeBuilder.nodeBuilder;
import static org.junit.Assert.assertEquals;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.SearchType;
import org.elasticsearch.client.Client;
import org.junit.Test;
This file has been truncated. show original
StackTrace.txt
Failed :
org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [dfs], total failure; shardFailures {[1IOMpS32QuSLMWkQkGG4iQ][test][0]: RemoteTransportException[[Lord Dark Wind][inet[/10.115.1.111:9300]][search/phase/dfs]]; nested: SearchParseException[[test][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: RuntimeException[Internal error: this code path should never get executed]; }{[1IOMpS32QuSLMWkQkGG4iQ][test][2]: RemoteTransportException[[Lord Dark Wind][inet[/10.115.1.111:9300]][search/phase/dfs]]; nested: SearchParseException[[test][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: RuntimeException[Internal error: this code path should never get executed]; }{[1IOMpS32QuSLMWkQkGG4iQ][test][3]: RemoteTransportException[[Lord Dark Wind][inet[/10.115.1.111:9300]][search/phase/dfs]]; nested: SearchParseException[[test][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: RuntimeException[Internal error: this code path should never get executed]; }{[1IOMpS32QuSLMWkQkGG4iQ][test][1]: RemoteTransportException[[Lord Dark Wind][inet[/10.115.1.111:9300]][search/phase/dfs]]; nested: SearchParseException[[test][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: RuntimeException[Internal error: this code path should never get executed]; }{[1IOMpS32QuSLMWkQkGG4iQ][test][4]: RemoteTransportException[[Lord Dark Wind][inet[/10.115.1.111:9300]][search/phase/dfs]]; nested: SearchParseException[[test][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: RuntimeException[Internal error: this code path should never get executed]; }
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:248)
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.access$400(TransportSearchTypeAction.java:75)
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$3.onFailure(TransportSearchTypeAction.java:198)
at org.elasticsearch.search.action.SearchServiceTransportAction$1.handleException(SearchServiceTransportAction.java:119)
at org.elasticsearch.transport.netty.MessageChannelHandler.handleException(MessageChannelHandler.java:158)
at org.elasticsearch.transport.netty.MessageChannelHandler.handlerResponseError(MessageChannelHandler.java:149)
at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:100)
at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
This file has been truncated. show original
index.sh
curl -XPUT http://localhost:9200/test/dossier/1 -d '{"conformite":"CONFORME", "direction":"DIRECTION", "domaine":{"reglementationsConcernees":["REG"], "supportsDeclaratifsForES":[{"SupportDeclaratif":{"specificite":{"SpecifSDec":{"regime":"1234"}}, "typesVerifications":["DOC"], "controlesPhysiques":[{"ControleMarchandise":{"conclusions":[{"Conclusion":{"reconnu":"1", "typePrecision":"VIDE", "conclusionCtrl":"CONFORME", "declare":"1", "typeAttributMarchandise":"NOMENCLATURE"}}, {"Conclusion":{"reconnu":"586.0", "typePrecision":"VIDE", "conclusionCtrl":"CONFORME", "declare":"586.0", "typeAttributMarchandise":"MASSE_NETTE"}}]}}], "bureauDouane":{"ServiceAdministrationDouane":{"europa":"FR00000", "nom":"Bureau"}}, "conclusion":"null", "infractions":[], "date":"2011-04-01T08:00:00.000+0000", "reference":"11111", "controlesDocumentaires":[{"ControleDocument":{"categorieLibelle":"Libelle", "typePrecision":"null", "categorieCode":"9999", "typeConclusionControle":"CONFORME"}}, {"ControleDocument":{"categorieLibelle":"Facture", "typePrecision":"null", "categorieCode":"8888", "typeConclusionControle":"CONFORME"}}]}}]}, "type":"DOUANE", "sources":[{"type":"CRIT"}], "dateDebut":"2011-04-01T10:00:00.000+0000", "etat":"VALIDE", "agentsRoles":[{"personne":{"Agent":{"nom":"MOI", "personnesIdentifiantsForES":[{"identifiant":"login"}]}}, "typesRoles":["REDACTEUR"]}], "lieuControle":"Bureau", "service":{"ServiceAdministrationDouane":{"europa":"FR00000", "nom":"Bureau"}}, "personnesControlees":[{"personne":{"PersonneMorale":{"nom":"MYCOMP", "personnesIdentifiantsForES":[{"identifiant":"MYEORI"}, {"identifiant":"MYSIRET"}]}}, "role":"DECLARANT"}], "identifiant":"66566767"}'
There are more than three files. show original
It works. I find my document.
Then I do it again with Java :
ESTestCase.java
package fr.pilato.hibernate.plugins.elasticsearch;
import static org.elasticsearch.index.query.xcontent.QueryBuilders.termQuery;
import static org.elasticsearch.node.NodeBuilder.nodeBuilder;
import static org.junit.Assert.assertEquals;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.SearchType;
import org.elasticsearch.client.Client;
import org.junit.Test;
This file has been truncated. show original
StackTrace.txt
Failed :
org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [dfs], total failure; shardFailures {[1IOMpS32QuSLMWkQkGG4iQ][test][0]: RemoteTransportException[[Lord Dark Wind][inet[/10.115.1.111:9300]][search/phase/dfs]]; nested: SearchParseException[[test][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: RuntimeException[Internal error: this code path should never get executed]; }{[1IOMpS32QuSLMWkQkGG4iQ][test][2]: RemoteTransportException[[Lord Dark Wind][inet[/10.115.1.111:9300]][search/phase/dfs]]; nested: SearchParseException[[test][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: RuntimeException[Internal error: this code path should never get executed]; }{[1IOMpS32QuSLMWkQkGG4iQ][test][3]: RemoteTransportException[[Lord Dark Wind][inet[/10.115.1.111:9300]][search/phase/dfs]]; nested: SearchParseException[[test][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: RuntimeException[Internal error: this code path should never get executed]; }{[1IOMpS32QuSLMWkQkGG4iQ][test][1]: RemoteTransportException[[Lord Dark Wind][inet[/10.115.1.111:9300]][search/phase/dfs]]; nested: SearchParseException[[test][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: RuntimeException[Internal error: this code path should never get executed]; }{[1IOMpS32QuSLMWkQkGG4iQ][test][4]: RemoteTransportException[[Lord Dark Wind][inet[/10.115.1.111:9300]][search/phase/dfs]]; nested: SearchParseException[[test][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: RuntimeException[Internal error: this code path should never get executed]; }
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:248)
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.access$400(TransportSearchTypeAction.java:75)
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$3.onFailure(TransportSearchTypeAction.java:198)
at org.elasticsearch.search.action.SearchServiceTransportAction$1.handleException(SearchServiceTransportAction.java:119)
at org.elasticsearch.transport.netty.MessageChannelHandler.handleException(MessageChannelHandler.java:158)
at org.elasticsearch.transport.netty.MessageChannelHandler.handlerResponseError(MessageChannelHandler.java:149)
at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:100)
at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
This file has been truncated. show original
index.sh
curl -XPUT http://localhost:9200/test/dossier/1 -d '{"conformite":"CONFORME", "direction":"DIRECTION", "domaine":{"reglementationsConcernees":["REG"], "supportsDeclaratifsForES":[{"SupportDeclaratif":{"specificite":{"SpecifSDec":{"regime":"1234"}}, "typesVerifications":["DOC"], "controlesPhysiques":[{"ControleMarchandise":{"conclusions":[{"Conclusion":{"reconnu":"1", "typePrecision":"VIDE", "conclusionCtrl":"CONFORME", "declare":"1", "typeAttributMarchandise":"NOMENCLATURE"}}, {"Conclusion":{"reconnu":"586.0", "typePrecision":"VIDE", "conclusionCtrl":"CONFORME", "declare":"586.0", "typeAttributMarchandise":"MASSE_NETTE"}}]}}], "bureauDouane":{"ServiceAdministrationDouane":{"europa":"FR00000", "nom":"Bureau"}}, "conclusion":"null", "infractions":[], "date":"2011-04-01T08:00:00.000+0000", "reference":"11111", "controlesDocumentaires":[{"ControleDocument":{"categorieLibelle":"Libelle", "typePrecision":"null", "categorieCode":"9999", "typeConclusionControle":"CONFORME"}}, {"ControleDocument":{"categorieLibelle":"Facture", "typePrecision":"null", "categorieCode":"8888", "typeConclusionControle":"CONFORME"}}]}}]}, "type":"DOUANE", "sources":[{"type":"CRIT"}], "dateDebut":"2011-04-01T10:00:00.000+0000", "etat":"VALIDE", "agentsRoles":[{"personne":{"Agent":{"nom":"MOI", "personnesIdentifiantsForES":[{"identifiant":"login"}]}}, "typesRoles":["REDACTEUR"]}], "lieuControle":"Bureau", "service":{"ServiceAdministrationDouane":{"europa":"FR00000", "nom":"Bureau"}}, "personnesControlees":[{"personne":{"PersonneMorale":{"nom":"MYCOMP", "personnesIdentifiantsForES":[{"identifiant":"MYEORI"}, {"identifiant":"MYSIRET"}]}}, "role":"DECLARANT"}], "identifiant":"66566767"}'
There are more than three files. show original
It fails with a SearchPhaseExecutionException. Here is the stacktrace :
ESTestCase.java
package fr.pilato.hibernate.plugins.elasticsearch;
import static org.elasticsearch.index.query.xcontent.QueryBuilders.termQuery;
import static org.elasticsearch.node.NodeBuilder.nodeBuilder;
import static org.junit.Assert.assertEquals;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.SearchType;
import org.elasticsearch.client.Client;
import org.junit.Test;
This file has been truncated. show original
StackTrace.txt
Failed :
org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [dfs], total failure; shardFailures {[1IOMpS32QuSLMWkQkGG4iQ][test][0]: RemoteTransportException[[Lord Dark Wind][inet[/10.115.1.111:9300]][search/phase/dfs]]; nested: SearchParseException[[test][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: RuntimeException[Internal error: this code path should never get executed]; }{[1IOMpS32QuSLMWkQkGG4iQ][test][2]: RemoteTransportException[[Lord Dark Wind][inet[/10.115.1.111:9300]][search/phase/dfs]]; nested: SearchParseException[[test][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: RuntimeException[Internal error: this code path should never get executed]; }{[1IOMpS32QuSLMWkQkGG4iQ][test][3]: RemoteTransportException[[Lord Dark Wind][inet[/10.115.1.111:9300]][search/phase/dfs]]; nested: SearchParseException[[test][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: RuntimeException[Internal error: this code path should never get executed]; }{[1IOMpS32QuSLMWkQkGG4iQ][test][1]: RemoteTransportException[[Lord Dark Wind][inet[/10.115.1.111:9300]][search/phase/dfs]]; nested: SearchParseException[[test][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: RuntimeException[Internal error: this code path should never get executed]; }{[1IOMpS32QuSLMWkQkGG4iQ][test][4]: RemoteTransportException[[Lord Dark Wind][inet[/10.115.1.111:9300]][search/phase/dfs]]; nested: SearchParseException[[test][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [_na_]]]; nested: RuntimeException[Internal error: this code path should never get executed]; }
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:248)
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.access$400(TransportSearchTypeAction.java:75)
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$3.onFailure(TransportSearchTypeAction.java:198)
at org.elasticsearch.search.action.SearchServiceTransportAction$1.handleException(SearchServiceTransportAction.java:119)
at org.elasticsearch.transport.netty.MessageChannelHandler.handleException(MessageChannelHandler.java:158)
at org.elasticsearch.transport.netty.MessageChannelHandler.handlerResponseError(MessageChannelHandler.java:149)
at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:100)
at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
This file has been truncated. show original
index.sh
curl -XPUT http://localhost:9200/test/dossier/1 -d '{"conformite":"CONFORME", "direction":"DIRECTION", "domaine":{"reglementationsConcernees":["REG"], "supportsDeclaratifsForES":[{"SupportDeclaratif":{"specificite":{"SpecifSDec":{"regime":"1234"}}, "typesVerifications":["DOC"], "controlesPhysiques":[{"ControleMarchandise":{"conclusions":[{"Conclusion":{"reconnu":"1", "typePrecision":"VIDE", "conclusionCtrl":"CONFORME", "declare":"1", "typeAttributMarchandise":"NOMENCLATURE"}}, {"Conclusion":{"reconnu":"586.0", "typePrecision":"VIDE", "conclusionCtrl":"CONFORME", "declare":"586.0", "typeAttributMarchandise":"MASSE_NETTE"}}]}}], "bureauDouane":{"ServiceAdministrationDouane":{"europa":"FR00000", "nom":"Bureau"}}, "conclusion":"null", "infractions":[], "date":"2011-04-01T08:00:00.000+0000", "reference":"11111", "controlesDocumentaires":[{"ControleDocument":{"categorieLibelle":"Libelle", "typePrecision":"null", "categorieCode":"9999", "typeConclusionControle":"CONFORME"}}, {"ControleDocument":{"categorieLibelle":"Facture", "typePrecision":"null", "categorieCode":"8888", "typeConclusionControle":"CONFORME"}}]}}]}, "type":"DOUANE", "sources":[{"type":"CRIT"}], "dateDebut":"2011-04-01T10:00:00.000+0000", "etat":"VALIDE", "agentsRoles":[{"personne":{"Agent":{"nom":"MOI", "personnesIdentifiantsForES":[{"identifiant":"login"}]}}, "typesRoles":["REDACTEUR"]}], "lieuControle":"Bureau", "service":{"ServiceAdministrationDouane":{"europa":"FR00000", "nom":"Bureau"}}, "personnesControlees":[{"personne":{"PersonneMorale":{"nom":"MYCOMP", "personnesIdentifiantsForES":[{"identifiant":"MYEORI"}, {"identifiant":"MYSIRET"}]}}, "role":"DECLARANT"}], "identifiant":"66566767"}'
There are more than three files. show original
When I search with a less deeper property, java search works (and curl also
! ;-)).
So, is there anything wrong with my document mapping ? I'm using the default
mapping provided by ES.
Perhaps, the way I wrote my java search is wrong.
Any help will be appreciated.
Cheers,
David.
Full gist here : https://gist.github.com/897892