<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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 中的默认语言环境设置以使其保持一致?)
                  <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>