• <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]);
                  

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

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

                  相关文档推荐

                  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如何按不区分大小写进行搜索)

                    <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>