• <bdo id='e6Qya'></bdo><ul id='e6Qya'></ul>

    1. <small id='e6Qya'></small><noframes id='e6Qya'>

      <tfoot id='e6Qya'></tfoot>
      <legend id='e6Qya'><style id='e6Qya'><dir id='e6Qya'><q id='e6Qya'></q></dir></style></legend>

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

        如何使用多短语查询?

        how to use a multiphrasequery?(如何使用多短语查询?)

          <bdo id='QhkIy'></bdo><ul id='QhkIy'></ul>
            <tfoot id='QhkIy'></tfoot>

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

                    <tbody id='QhkIy'></tbody>

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

                  <legend id='QhkIy'><style id='QhkIy'><dir id='QhkIy'><q id='QhkIy'></q></dir></style></legend>
                  本文介绍了如何使用多短语查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  http://lucene.apache.org/java/2_3_1/api/core/org/apache/lucene/search/MultiPhraseQuery.html

                  对于示例Microsoft app*",他说使用 IndexReader.term() 但返回 TermEnum,我如何将它放入 MultiPhraseQueryParser ?

                  for the example "Microsoft app*", he says use IndexReader.term() but that returns TermEnum, how do I put it in MultiPhraseQueryParser ?

                  或者有人告诉我如何在 Microsoft 应用程序* 上以更好的方式搜索超过 7.5 GB 的索引!!

                  Or someone tell me how do I do a search on Microsoft app* in a better way over a 7.5 GB index!!

                  推荐答案

                  您需要迭代 TermEnum 以获取条款.您可以迭代 TermEnum 以获取以app"开头的术语,如下所示.

                  You need to iterate on TermEnum to get the terms. You can iterate on the TermEnum to get terms starting with "app" as follows.

                      TermEnum te = reader.terms(new Term("field", "app"));
                      List<Term> termList = new LinkedList<Term>();       
                      while(te.next()) {
                          Term t = te.term();
                          if (!t.field().equals("field") || !t.text().startsWith("app")) {
                              break;
                          }
                          termList.add(t);
                      }
                      Term[] terms = termList.toArray(new Term[0]);
                  

                  这篇关于如何使用多短语查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)

                    <tfoot id='XNwzr'></tfoot>

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

                          • <legend id='XNwzr'><style id='XNwzr'><dir id='XNwzr'><q id='XNwzr'></q></dir></style></legend>

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

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