一、lucene简介 Lucene是apache下的一个靠性能的、功能全面的用纯java开发的一个全文搜索引擎库。它几乎适合任何需要全文搜索应用程序,尤其是跨平台。lucene是开源的免费的工程。lucene使用简单但是提供的功能非常强大。相关特点如下:在硬件上的速度超过150 ...
一、lucene简介
Lucene是apache下的一个靠性能的、功能全面的用纯java开发的一个全文搜索引擎库。它几乎适合任何需要全文搜索应用程序,尤其是跨平台。lucene是开源的免费的工程。lucene使用简单但是提供的功能非常强大。相关特点如下:
- 在硬件上的速度超过150GB/小时
- 更小的内存需求,只需要1MB堆空间
- 快速地增加索引、与批量索引
- 索引的大小大于为被索引文本的20%-30%
lucene下载地址为:http://lucene.apache.org/
文本示例工程使用maven构建,lucene版本为5.2.1。相关依赖文件如下:
<project ="http://maven.apache.org/POM/4.0.0" ="http://www.w3.org/2001/ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.shh</groupId> <artifactId>lucene</artifactId> <packaging>war</packaging> <version>0.0.1-SNAPSHOT</version> <name>lucene Maven Webapp</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <lucene.version>5.2.1</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-smartcn</artifactId> <version>${lucene.version}</version> </dependency> <dependency> <groupId>org.apache.lucene</groupId> <artifactId>lucene-highlighter</artifactId> <version>${lucene.version}</version> </dependency> </dependencies> <build> <finalName>lucene</finalName> </build></project>
海外公司注册、海外银行开户、跨境平台代入驻、VAT、EPR等知识和在线办理:https://www.xlkjsw.com
原标题:lucene入门
关键词:
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。