隐式加入lucene [英] Implicit join in lucene

查看:93
本文介绍了隐式加入lucene的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在Lucene中执行以下操作?如果没有,您能提供一些有关如何解决此限制的建议吗?

Is it possible to do something like the following in lucene? If not, can you give any suggestions for how to get around this limitation?

SELECT
start.dt AS eventstarttime,
last.dt AS eventfinishtime
WHERE
start.evt:"Started" AND last.evt:"Ended" AND start.evtgrpid = last.evtgrpid

推荐答案

您的问题没有提供足够的信息来完全回答它.该SQL甚至无效-FROM子句(对于开始)在哪里?

Your question does not give enough information to fully answer it. This SQL is not even valid - where is the FROM clause (for a start)?

建议1:分别运行两个查询(开始"和结束"),并基于evtgrpid合并结果.

Suggestion 1: run two queries ("Started" and "Ended") separately and merge the results based on evtgrpid.

建议2:运行一个查询(例如已开始"),然后根据已结束"条件过滤结果.

Suggestion 2: run one query (e.g. "Started") and filter the results based on "Ended" criteria.

建议3:不要将Lucene用于构建数据库的目的.真的.通常,数据库逻辑甚至甚至都不适用于Lucene(例如,如果在索引时使用了停用词,该怎么办?).

Suggestion 3: do not use Lucene for what databases are built for. Really. Often database logic does not even apply to Lucene (e.g. what if stopwords are used when indexing?).

这篇关于隐式加入lucene的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆