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

        <small id='4mkjg'></small><noframes id='4mkjg'>

        • <bdo id='4mkjg'></bdo><ul id='4mkjg'></ul>

      1. KeywordAnalyzer 和 LowerCaseFilter/LowerCaseTokenizer

        KeywordAnalyzer and LowerCaseFilter/LowerCaseTokenizer(KeywordAnalyzer 和 LowerCaseFilter/LowerCaseTokenizer)

      2. <small id='IaVpp'></small><noframes id='IaVpp'>

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

            <i id='IaVpp'><tr id='IaVpp'><dt id='IaVpp'><q id='IaVpp'><span id='IaVpp'><b id='IaVpp'><form id='IaVpp'><ins id='IaVpp'></ins><ul id='IaVpp'></ul><sub id='IaVpp'></sub></form><legend id='IaVpp'></legend><bdo id='IaVpp'><pre id='IaVpp'><center id='IaVpp'></center></pre></bdo></b><th id='IaVpp'></th></span></q></dt></tr></i><div id='IaVpp'><tfoot id='IaVpp'></tfoot><dl id='IaVpp'><fieldset id='IaVpp'></fieldset></dl></div>
            <tfoot id='IaVpp'></tfoot>
              <bdo id='IaVpp'></bdo><ul id='IaVpp'></ul>
                    <tbody id='IaVpp'></tbody>
                  本文介绍了KeywordAnalyzer 和 LowerCaseFilter/LowerCaseTokenizer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想构建自己的分析器,同时使用过滤器/标记器.

                  I want to build my own analyzer that uses both filters/tokenizers.

                  我的意思是,相同的字段是 Keyword(整个流作为单个标记)和小写

                  I mean, the same field is Keyword (entire stream as a single token) and lowercase

                  如果 KeywordAnalyzer仅使用,字段的值不区分大小写.如果我使用 LowerCaseTokenizer 或LowerCaseFilter 我要结合它们与其他执行相同操作的分析器 KeywordAnalyzer(不使用字母、空格、删除停用词等分隔)

                  If KeywordAnalyzer use only, the value of field keeps the case-insensitive. If I use LowerCaseTokenizer or LowerCaseFilter I have to combine them with other analyzers that do the same thing KeywordAnalyzer (separated by no letter, by spaces, remove stop-words, etc.)

                  问题是:有没有办法使用过滤器或分析器 Lucene 或标记器将该字段设为关键字(将整个流作为单个标记)和 小写?

                  The question is: Is there any way to make that field as Keyword (entire stream as a single token) and that lowercase using filters or analyzers Lucene or tokenizers?

                  (谷歌翻译,错误见谅)

                  (google translated, sorry about errors)

                  推荐答案

                  这应该可行:

                  public final class YourAnalyzer extends ReusableAnalyzerBase { 
                  
                    @Override
                    protected TokenStreamComponents createComponents(final String fieldName, final Reader reader) {
                      final TokenStream source = new KeywordTokenizer(reader);
                      return new TokenStreamComponents(source, new LowercaseFilter(Version.LUCENE_36, source));
                    }
                  }
                  

                  这篇关于KeywordAnalyzer 和 LowerCaseFilter/LowerCaseTokenizer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 中的任何一个都可以)?)
                  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如何按不区分大小写进行搜索)
                  solrj: how to store and retrieve Listlt;POJOgt; via multivalued field in index(solrj:如何存储和检索Listlt;POJOgt;通过索引中的多值字段)
                  <legend id='YVxNm'><style id='YVxNm'><dir id='YVxNm'><q id='YVxNm'></q></dir></style></legend>

                  • <bdo id='YVxNm'></bdo><ul id='YVxNm'></ul>
                  • <small id='YVxNm'></small><noframes id='YVxNm'>

                          <tbody id='YVxNm'></tbody>
                        • <tfoot id='YVxNm'></tfoot>

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