solr中的单个模式与多个模式的不同文档类型 [英] Single schema versus multiple schemas in solr for different document types

查看:166
本文介绍了solr中的单个模式与多个模式的不同文档类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在决定创建多个模式还是为不同的文档类型创建单一的合并模式时,一般的经验法则是什么?

例如,如果我想索引产品集合和文章集合,应该遵循哪些通用规则来确定是否应该在一个模式中创建它们(然后使用solr fq过滤器查询来过滤文档类型),或者创建两个模式。重叠字段的数量?是否需要在两种文档类型之间返回数据,并且能够过滤为单一类型?

解决方案



如果您有实体


  • ,您可以在回应中一起显示或
  • 有它们之间的关系



将它们作为单个索引会更好。

您可以拥有不同的实体,并希望在查询时加入它们,这将有助于在单个核心中。 (尽管有了最新的发展,但我认为它也可能跨越核心)



如果你的实体完全不相关,最好把它们作为一个独立的核心以便您以不同的方式维护它们。

多核可以给您更多的灵活性来配置核心级别的安全性,可变增量索引和分配给每个核心....

多核使用一些更多的资源取决于条款重复,缓存等

What is the general rule of thumb when deciding between creating multiple schemas versus creating a single consolidated schema for different document types.

For example, if I want to index a collection of products and a collection of articles, what general rules should be followed to determine whether they should be created in one schema (and then use solr fq filter query to filter on the document type) or created in two schemas. The number of overlapping fields? The need to return data across both document types and also be able to filter to a single type?

解决方案

There may not be any rule of thumb and is more of preference.

If you have entities

  • which you want to show in your response together or
  • have relationship between them

it would be better to have them as a Single index.

You can have different entities and want join them at query time it would help being in a single core. (Although with latest development, I think it is possible across cores as well)

If your entities are completely unrelated to each other it is better to have them as a separate core so that you maintain them differently.
Multiple cores can give you more flexibility to configure security at core level, variable incremental indexing and distribution for each core ....
Multiple cores may use some more resources depending upon the terms duplication, cache and so on

这篇关于solr中的单个模式与多个模式的不同文档类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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