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

    2. <small id='1l0fX'></small><noframes id='1l0fX'>

      1. Lucene - 短语中的通配符

        时间:2023-09-14
          <bdo id='8r7qo'></bdo><ul id='8r7qo'></ul>

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

              <small id='8r7qo'></small><noframes id='8r7qo'>

                <tbody id='8r7qo'></tbody>
                  本文介绍了Lucene - 短语中的通配符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我目前正在尝试使用 Lucene 搜索填充在索引中的数据.

                  I am currently attempting to use Lucene to search data populated in an index.

                  我可以通过将其括在括号中来匹配确切的短语(即处理文档"),但无法让 Lucene 通过执行任何类型的处理文档*"来找到该短语.

                  I can match on exact phrases by enclosing it in brackets (i.e. "Processing Documents"), but cannot get Lucene to find that phrase by doing any sort of "Processing Document*".

                  明显的区别是末尾的通配符.

                  The obvious difference being the wildcard at the end.

                  我目前正在尝试使用 Luke 来查看和搜索索引.(解析时会去掉短语末尾的星号)

                  I am currently attempting to use Luke to view and search the index. (it drops the asterisk at the end of the phrase when parsing)

                  在数据周围添加引号似乎是主要的罪魁祸首,因为搜索 document* 会起作用,但 "document*" 不起作用

                  Adding the quotes around the data seems to be the main culprit as searching for document* will work, but "document*" does not

                  任何帮助将不胜感激

                  推荐答案

                  QueryParser 不仅不支持词组中的通配符,而且 PhraseQuery 本身只支持词组.MultiPhraseQuery 更近了,但正如其摘要所说,您仍然需要自己枚举 IndexReader.terms 以匹配通配符.

                  Not only does the QueryParser not support wildcards in phrases, PhraseQuery itself only supports Terms. MultiPhraseQuery comes closer, but as its summary says, you still need to enumerate the IndexReader.terms yourself to match the wildcard.

                  这篇关于Lucene - 短语中的通配符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Lucene RangeQuery 没有正确过滤 下一篇:Lucene.Net 在我的主机上失败,因为它调用 GetTempPath().有什么工作?

                  相关文章

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

                  <tfoot id='Ez1pJ'></tfoot>

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

                      <legend id='Ez1pJ'><style id='Ez1pJ'><dir id='Ez1pJ'><q id='Ez1pJ'></q></dir></style></legend>