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

        使用最新版本 Lucene 的示例

        时间:2023-09-29
          <bdo id='0zG7F'></bdo><ul id='0zG7F'></ul>

            <tfoot id='0zG7F'></tfoot>

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

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

                  <small id='0zG7F'></small><noframes id='0zG7F'>

                    <tbody id='0zG7F'></tbody>
                1. 本文介绍了使用最新版本 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 的示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:在 Java api 中的 Solr 搜索中需要搜索的文本和围绕 下一篇:使用 JdbcDirectory 在数据库中创建 Lucene 索引

                  相关文章

                  最新文章

                2. <legend id='73987'><style id='73987'><dir id='73987'><q id='73987'></q></dir></style></legend>

                3. <small id='73987'></small><noframes id='73987'>

                  <tfoot id='73987'></tfoot>

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