Lucene官网,在官网里直接下载:http://lucene.apache.org/
推荐下载最新版本,但是从004文档开始为了使用中文分词器IK-Analyzer不得已用老版本的Lucene,历史版本的Lucene
http://archive.apache.org/dist/lucene/java/
下载完后解压到你想存放的目录,下面是Lucene里我们会用到的jar包maven的pom文件,实体的jar包在lucene的安装目录里也能找到(这里以7.6.0为例)
<!--单元测试-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<!--lucene相关的jar,版本要与你安装的Lucene一致-->
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>7.6.0</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-queryparser</artifactId>
<version>7.6.0</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-common</artifactId>
<version>7.6.0</version>
</dependency>
<!--lucene的依赖jar-->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>