简体   繁体   English

在Lucene / Solr中,Join和BlockJoin有什么区别?

[英]In Lucene/Solr what is the difference between Join and BlockJoin?

Join is described as pseudo-Join, because it's more equivalent to an SQL inner-query. 联接被描述为伪联接,因为它更等效于SQL内部查询。 Whereas BlockJoin is described as more like a SQL join but requiring a sophisticated indexing schema, one that anticipates all the possible joins you'd want to make. 尽管BlockJoin 被描述为更像SQL连接,但需要复杂的索引架构,但该架构可以预期您要进行的所有可能的连接。 Could someone explain the difference between these features in terms of how to implement them at index time and query time. 有人可以解释如何在索引时间和查询时间实现这些功能之间的区别。 And what are the implications for performance? 对性能有什么影响?

I don't think blockjoinquery is a Solr function. 我不认为blockjoinquery是Solr函数。 I think its Lucene feature. 我认为它的Lucene功能。

The solr join doesn't score documents in the from query and it doesn't return combined results. solr联接不会对from查询中的文档进行评分,并且不会返回合并的结果。 So its best used as a filter query. 因此,最好将其用作过滤器查询。 This will allow the main query.to score. 这将允许主query.to得分。

Block join on the other hand does use scoring and returns both results.( not 100% sure) 另一方面,Block Join确实使用评分并返回两个结果。(不是100%确定)

You can also use querytime join. 您还可以使用querytime连接。 This has serval scoring options. 这具有服务评分选项。 This is also a lucene feature but doesn't require special indexing blocks. 这也是一个Lucene功能,但不需要特殊的索引块。 I've used this in combination with a solr query parser plugin. 我已经将其与solr查询解析器插件结合使用。 The performance is a bit lower then blockjoin but it Works. 与blockjoin相比,性能要低一些,但可以。

I have only used solr join and querytimejoin So I can't really say much about blockjoin. 我只使用了solr join和querytimejoin,所以我不能说太多关于blockjoin的内容。

As I understand, BlockJoin is for joining against nested/child documents within the same core. 据我了解,BlockJoin用于连接同一核心内的嵌套/子文档。 Join is for joining against a separate core. 联接用于联接到单独的核心。

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

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