<i id='bV4NO'><tr id='bV4NO'><dt id='bV4NO'><q id='bV4NO'><span id='bV4NO'><b id='bV4NO'><form id='bV4NO'><ins id='bV4NO'></ins><ul id='bV4NO'></ul><sub id='bV4NO'></sub></form><legend id='bV4NO'></legend><bdo id='bV4NO'><pre id='bV4NO'><center id='bV4NO'></center></pre></bdo></b><th id='bV4NO'></th></span></q></dt></tr></i><div id='bV4NO'><tfoot id='bV4NO'></tfoot><dl id='bV4NO'><fieldset id='bV4NO'></fieldset></dl></div>

    <small id='bV4NO'></small><noframes id='bV4NO'>

    1. <tfoot id='bV4NO'></tfoot>
      • <bdo id='bV4NO'></bdo><ul id='bV4NO'></ul>
      <legend id='bV4NO'><style id='bV4NO'><dir id='bV4NO'><q id='bV4NO'></q></dir></style></legend>
    2. 如何在 solr 结果中获得构面范围?

      How to get facet ranges in solr results?(如何在 solr 结果中获得构面范围?)

        <legend id='tBS8E'><style id='tBS8E'><dir id='tBS8E'><q id='tBS8E'></q></dir></style></legend>
          • <small id='tBS8E'></small><noframes id='tBS8E'>

              <bdo id='tBS8E'></bdo><ul id='tBS8E'></ul>
              <tfoot id='tBS8E'></tfoot>
              <i id='tBS8E'><tr id='tBS8E'><dt id='tBS8E'><q id='tBS8E'><span id='tBS8E'><b id='tBS8E'><form id='tBS8E'><ins id='tBS8E'></ins><ul id='tBS8E'></ul><sub id='tBS8E'></sub></form><legend id='tBS8E'></legend><bdo id='tBS8E'><pre id='tBS8E'><center id='tBS8E'></center></pre></bdo></b><th id='tBS8E'></th></span></q></dt></tr></i><div id='tBS8E'><tfoot id='tBS8E'></tfoot><dl id='tBS8E'><fieldset id='tBS8E'></fieldset></dl></div>

                  <tbody id='tBS8E'></tbody>

                本文介绍了如何在 solr 结果中获得构面范围?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                假设我有一个名为 price 的字段用于 Solr 中的文档,并且我对该字段进行了分面.我想将方面作为值范围(例如:0-100、100-500、500-1000 等).怎么做?

                Assume that I have a field called price for the documents in Solr and I have that field faceted. I want to get the facets as ranges of values (eg: 0-100, 100-500, 500-1000, etc). How to do it?

                我可以预先指定范围,但我也想知道是否可以根据文档中的值自动计算范围(比如 5 个值)?

                I can specify the ranges beforehand, but I also want to know whether it is possible to calculate the ranges (say for 5 values) automatically based on the values in the documents?

                推荐答案

                要回答您的第一个问题,您可以通过使用通用构面查询支持来获取构面范围.这里是一个例子:

                To answer your first question, you can get facet ranges by using the the generic facet query support. Here's an example:

                http://localhost:8983/solr/select?q=video&rows=0&facet=true&facet.query=price:[*+TO+500]&facet.query=price:[500+TO+*]
                

                至于您的第二个问题(自动建议构面范围),尚未实施.有人认为这种查询最好在您的应用程序上实现,而不是让 Solr猜测"最佳构面范围.

                As for your second question (automatically suggesting facet ranges), that's not yet implemented. Some argue that this kind of querying would be best implemented on your application rather that letting Solr "guess" the best facet ranges.

                以下是关于该主题的一些讨论:

                Here are some discussions on the topic:

                • (已归档)https://web.archive.org/web/20100416235126/http://old.nabble.com/Re:-faceted-browsing-p3753053.html
                • (已归档)https://web.archive.org/web/20090430160232/http://www.nabble.com/Re:-Sorting-p6803791.html
                • (存档)https://web.archive.org/web/20090504020754/http://www.nabble.com/Dynamically-calculated-range-facet-td11314725.html

                这篇关于如何在 solr 结果中获得构面范围?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Lucene Porter Stemmer not public(Lucene Porter Stemmer 未公开)
                How to index pdf, ppt, xl files in lucene (java based or python or php any of these is fine)?(如何在 lucene 中索引 pdf、ppt、xl 文件(基于 java 或 python 或 php 中的任何一个都可以)?)
                KeywordAnalyzer and LowerCaseFilter/LowerCaseTokenizer(KeywordAnalyzer 和 LowerCaseFilter/LowerCaseTokenizer)
                How to search between dates (Hibernate Search)?(如何在日期之间搜索(休眠搜索)?)
                How to get positions from a document term vector in Lucene?(如何从 Lucene 中的文档术语向量中获取位置?)
                Java Lucene 4.5 how to search by case insensitive(Java Lucene 4.5如何按不区分大小写进行搜索)

                  <i id='I8Yzh'><tr id='I8Yzh'><dt id='I8Yzh'><q id='I8Yzh'><span id='I8Yzh'><b id='I8Yzh'><form id='I8Yzh'><ins id='I8Yzh'></ins><ul id='I8Yzh'></ul><sub id='I8Yzh'></sub></form><legend id='I8Yzh'></legend><bdo id='I8Yzh'><pre id='I8Yzh'><center id='I8Yzh'></center></pre></bdo></b><th id='I8Yzh'></th></span></q></dt></tr></i><div id='I8Yzh'><tfoot id='I8Yzh'></tfoot><dl id='I8Yzh'><fieldset id='I8Yzh'></fieldset></dl></div>

                    • <tfoot id='I8Yzh'></tfoot>
                    • <legend id='I8Yzh'><style id='I8Yzh'><dir id='I8Yzh'><q id='I8Yzh'></q></dir></style></legend>

                      <small id='I8Yzh'></small><noframes id='I8Yzh'>

                          <bdo id='I8Yzh'></bdo><ul id='I8Yzh'></ul>

                            <tbody id='I8Yzh'></tbody>