简体   繁体   English

用elasticsearch替换索引服务器

[英]replacing index server with elasticsearch

I have created an elasticsearch index against a news table on sqlserver using logstash via the JDBC Driver. 我已经通过JDBC驱动程序使用logstash在sqlserver上的新闻表上创建了一个Elasticsearch索引。 This all looks good in Elasticsearch. 在Elasticsearch中,这一切看起来都不错。

Using Index Server, the type of query that gets built for that takes the following form: 使用索引服务器,为其构建的查询类型采用以下形式:

SELECT News.*, fulltextsearch.rank FROM News INNER JOIN CONTAINSTABLE(News, ( Headline, BodyText ), 'ISABOUT("car track race" WEIGHT(0.65), car NEAR track NEAR race)') fulltextsearch ON News.NewsID = fulltextsearch.[Key] WHERE DateSubmitted <= '01/11/2017' ORDER BY fulltextsearch.rank DESC

Is there any kind of query that I can do in Elasticsearch to give a similar/same outcome as the above. 我可以在Elasticsearch中进行任何类型的查询以得出与上述类似/相同的结果。

No, elasticsearch (version 5.3) do not support JOIN like this. 不,elasticsearch(5.3版)不支持这样的JOIN。 See https://www.elastic.co/guide/en/elasticsearch/reference/current/joining-queries.html . 参见https://www.elastic.co/guide/en/elasticsearch/reference/current/joining-queries.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM