问题描述
问题1:我们可以在没有提及索引时的提升值的情况下进行查询时间提升(使用dismax)吗?
Question 1: Can we do Query time boosting(with dismax) only without mentioning boost values at Index time?
问题2:有什么优点/缺点将索引时间提升超过查询时间提升,反之亦然。
Question 2: What are the advantages/disadvantages of doing Index time boost over Query time boost and vice versa.
查询时间和索引时间提升:
Query-time and index-time boosting:
在索引时,您可以选择提升特定文档(完全或仅仅是字段)。这在内部存储为规范编号的一部分,必须启用该编号才能使其生效。执行索引时间提升并不常见。
在查询时,我们先前已经描述了如果需要,如何提高或降低查询的特定子句。稍后将演示强大的Disjunction-Max(简称dismax)查询,它可以自动将搜索应用于具有不同提升级别的多个字段。
At index-time, you have the option to boost a particular document (entirely or just a field). This is internally stored as part of the norms number, which must be enabled for this to work. It's uncommon to perform index-time boosting.At query-time, we have described earlier how to boost a particular clause of a query higher or lower if needed. Later the powerful Disjunction-Max (dismax for short) query will be demonstrated, which can apply searches to multiple fields with different boosting levels automatically.
- 第4章的段落书Solr 1.4企业级搜索服务器
--Paragraph from Chapter 4 of book "Solr 1.4 Enterprise Search Server"
推荐答案
问题1
是的,绝对。
问题2
索引时间提升可能会快一点,但你需要知道增强是在单个字节上编码的,这可能导致精度损失:
Index time boosting may be a little faster but you need to know that boosts are encoded on a single byte which can lead to precision loss: In Lucene, why do my boosted and unboosted documents get the same score?
查询时间提升更灵活(它们可以基于每个查询进行配置)。
Query-time boosts are more flexible (they are configurable on a per-query basis).
索引时间提升是有点不切实际,我宁愿建议你明星提高查询时间。
Index-time boost are a little impractical, I would rather recommend that you get started with query-time boosts.
这篇关于Solr Index时间提升VS查询时间提升?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!