私は同様の問題に直面しました。ここに参加する必要があります。 Elasticsearchチームは、アプリケーション側の使用を勧告します。 ESは、実装することで、リレーショナルデータベースは、我々のアプリケーションに参加するエミュレート:http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/application-joins.html ですから、ESクライアントのいずれかを使用し、ここで
SearchResponse response = client.prepareSearch(scriptVersionFirst)
.setTypes("yourtype")
.setQuery(QueryBuilders.termQuery("multi", "test"))
.setFrom(0).setSize(60).setExplain(true)
.execute()
.actionGet();
if (response != null) {
SearchHits hitList = response.getHits();
if (hitList != null) {
SearchHit[] hits = hitList.hits();
for (SearchHit hit : hits)
MethodPojo source = gson.fromJson(hit.getSourceAsString(), MethodPojo.class);
System.out.println("Found: " + getMethodResultEntity(scriptVersionSecond, hit.getType(), source.getMethodName(), source.getMethodDesc(), source.getRequest()));
}
}
似た何かを書くことができ、他のGETクエリのgetMethodResultEntityリターン結果を機能します。
P.S.私はここでESのJavaクライアントを使用しています。それは少し重いです。 Javaクライアントが必要な場合は、jestクライアントを使用する方が良いでしょう。
ElasticSearchデータストアのHiveからJOIN操作を実行するには、ElasticSearch Hiveコネクタを使用できますか? - https://github.com/elastic/elasticsearch-hadoop – sumanth232
[Elastic Searchと "サブクエリ]の重複の可能性あり(http://stackoverflow.com/questions/8808832/elastic-search-and-sub-queries) – Ankur