1. <legend id='RwvEJ'><style id='RwvEJ'><dir id='RwvEJ'><q id='RwvEJ'></q></dir></style></legend>

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

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

        使用最新版本 Lucene 的示例

        Examples for using latest version of Lucene(使用最新版本 Lucene 的示例)

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

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

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

                • <bdo id='xNUzK'></bdo><ul id='xNUzK'></ul>
                • 本文介绍了使用最新版本 Lucene 的示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我是 Lucene 新手,想在 Maven 环境中直接从我的 Java 代码调用它.我已经尝试了一段时间来寻找可以下载和运行的工作示例.官网最新的教程是2013-Lucene 3.* https://cwiki.apache.org/confluence/display/lucene/LuceneFAQ#LuceneFAQ-HowdoIstartusingLucene?.Maven 中当前的最新版本是 8.5.1 .网络上的大多数非官方教程不包含版本号或完全限定名称.Lucene 似乎会频繁更改其 API、语法和名称,因此会出现编译错误、ClassNotFound 和删除的方法.我想知道:

                  I'm new to Lucene and want to call it directly from my Java code in a Maven environment. I have tried for some time to find working examples that I can download and run. The latest tutorial on the official site is 2013 - Lucene 3.* https://cwiki.apache.org/confluence/display/lucene/LuceneFAQ#LuceneFAQ-HowdoIstartusingLucene?. The current latest version in Maven is 8.5.1 . Most non-official tutorials on the web do not contain version numbers or Fully Qualified Names. Lucene appears to change its API, syntax, and names at frequent intervals so that compile errors, ClassNotFound, and deleted methods occur. I'd like to know:

                  • 当前稳定版本
                  • 涉及的 Lucene 包(是否需要 lucene-query 包?)
                  • 指向 2020 年适用于这些版本的代码的指针

                  推荐答案

                  最新版文档的主页是这里.这包括所有 javadoc 部分的链接(不同库的不同部分).

                  The home page for the latest version of the documentation is here. This includes links to all the javadoc sections (different sections for different libraries).

                  它还包含一些当前工作代码示例的链接(是的,从 pre-8 到 8+ 存在重大更改).如您所见,在这方面 wiki 可能不可靠.

                  It also includes links to some current working code examples (yes, there are breaking changes from pre-8 to 8+). The wiki can be unreliable in this regard, as you have seen.

                  main demo 可能是最好的起点查看工作代码示例.

                  The main demo is probably the best place to start to see working code examples.

                  具体见如何索引和如何搜索示例.

                  您需要哪些软件包完全取决于您要做什么.例如,您不太可能需要空间分析包,除非您知道自己需要它.

                  Which packages you need depends entirely on what you are trying to do. It's unlikely that you will need the spatial analysis package, for example, unless you know you need it.

                  我的 POM 通常包括这些:

                  My POM typically includes these:

                  <properties>
                      <lucene.version>8.5.0</lucene.version>
                  </properties>
                  
                  <dependencies>
                      <dependency>        
                          <groupId>org.apache.lucene</groupId>          
                          <artifactId>lucene-core</artifactId>
                          <version>${lucene.version}</version>
                      </dependency>
                      <dependency>
                          <groupId>org.apache.lucene</groupId>
                          <artifactId>lucene-queryparser</artifactId>
                          <version>${lucene.version}</version>
                      </dependency>
                      <dependency>
                          <groupId>org.apache.lucene</groupId>
                          <artifactId>lucene-analyzers-common</artifactId>
                          <version>${lucene.version}</version>
                      </dependency>
                      <dependency>
                          <groupId>org.apache.lucene</groupId>
                          <artifactId>lucene-analyzers-icu</artifactId>
                          <version>${lucene.version}</version>
                      </dependency>
                  </dependencies>
                  

                  有时我也使用这些:

                  <dependency>
                      <groupId>org.apache.lucene</groupId>
                      <artifactId>lucene-suggest</artifactId>
                      <version>${lucene.version}</version>
                  </dependency>
                  <dependency>
                      <groupId>org.apache.lucene</groupId>
                      <artifactId>lucene-highlighter</artifactId>
                      <version>${lucene.version}</version>
                  </dependency>
                  

                  这篇关于使用最新版本 Lucene 的示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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='YvCMN'></tfoot>

                      <tbody id='YvCMN'></tbody>

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

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

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