Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a00336d239 | |||
| 32d874b1ba | |||
| 7b0d009d32 | |||
| e3695f9192 | |||
| 33ac83d619 | |||
| fa1451042b | |||
| c2e408473a |
@@ -0,0 +1,38 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Smartphone (please complete the following information):**
|
||||
- Device: [e.g. iPhone6]
|
||||
- OS: [e.g. iOS8.1]
|
||||
- Browser [e.g. stock browser, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
# ik-analyzer-solr7
|
||||
ik-analyzer for solr7.x
|
||||
# ik-analyzer-solr
|
||||
ik-analyzer for solr 7.x-8.x
|
||||
|
||||
<!-- Badges section here. -->
|
||||
[](https://search.maven.org/search?q=g:com.github.magese%20AND%20a:ik-analyzer&core=gav)
|
||||
[](https://github.com/magese/ik-analyzer-solr7/releases)
|
||||
[](https://github.com/magese/ik-analyzer-solr/releases)
|
||||
[](./LICENSE)
|
||||
[](https://travis-ci.org/magese/ik-analyzer-solr7)
|
||||
[](https://travis-ci.org/magese/ik-analyzer-solr)
|
||||
|
||||
[](https://github.com/magese/ik-analyzer-solr7/fork)
|
||||
[](https://github.com/magese/ik-analyzer-solr7/stargazers)
|
||||
[](https://github.com/magese/ik-analyzer-solr/network/members)
|
||||
[](https://github.com/magese/ik-analyzer-solr/stargazers)
|
||||
<!-- /Badges section end. -->
|
||||
|
||||
## 简介
|
||||
#### 适配最新版本solr7;
|
||||
#### 适配最新版本solr 7&8;
|
||||
#### 扩展IK原有词库:
|
||||
| 分词工具 | 词库中词的数量 | 最后更新时间 |
|
||||
| :------: | :------: | :------: |
|
||||
@@ -29,7 +29,7 @@ ik-analyzer for solr7.x
|
||||
|
||||
|
||||
## 使用说明
|
||||
* jar包下载地址:[](https://search.maven.org/remotecontent?filepath=com/github/magese/ik-analyzer/7.7.0/ik-analyzer-7.7.0.jar)
|
||||
* jar包下载地址:[](https://search.maven.org/remotecontent?filepath=com/github/magese/ik-analyzer/8.0.0/ik-analyzer-8.0.0.jar)
|
||||
* 历史版本:[](https://search.maven.org/search?q=g:com.github.magese%20AND%20a:ik-analyzer&core=gav)
|
||||
|
||||
```console
|
||||
@@ -37,7 +37,7 @@ ik-analyzer for solr7.x
|
||||
<dependency>
|
||||
<groupId>com.github.magese</groupId>
|
||||
<artifactId>ik-analyzer</artifactId>
|
||||
<version>7.7.0</version>
|
||||
<version>8.0.0</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
@@ -91,6 +91,8 @@ ik-analyzer for solr7.x
|
||||
|
||||
|
||||
## 更新说明
|
||||
- `2019-05-15:` 升级lucene版本为`8.0.0`,并支持Solr8使用
|
||||
- `2019-03-01:` 升级lucene版本为`7.7.1`
|
||||
- `2019-02-15:` 升级lucene版本为`7.7.0`
|
||||
- `2018-12-26:`
|
||||
- 升级lucene版本为`7.6.0`
|
||||
@@ -109,7 +111,7 @@ ik-analyzer for solr7.x
|
||||
|
||||
## 感谢 Thanks
|
||||
|
||||
[](https://www.jetbrains.com/?from=ik-analyzer-solr7)
|
||||
[](https://www.jetbrains.com/?from=ik-analyzer-solr)
|
||||
|
||||
[](https://www.java.com)
|
||||
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
|
||||
<groupId>com.github.magese</groupId>
|
||||
<artifactId>ik-analyzer</artifactId>
|
||||
<version>7.7.0</version>
|
||||
<version>8.0.0</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>ik-analyzer-solr7</name>
|
||||
<name>ik-analyzer-solr</name>
|
||||
<url>http://code.google.com/p/ik-analyzer/</url>
|
||||
<description>IK-Analyzer for solr7.7</description>
|
||||
<description>IK-Analyzer for solr 7-8</description>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<lucene.version>7.7.0</lucene.version>
|
||||
<lucene.version>8.0.0</lucene.version>
|
||||
<javac.src.version>1.8</javac.src.version>
|
||||
<javac.target.version>1.8</javac.target.version>
|
||||
<maven.compiler.plugin.version>3.3</maven.compiler.plugin.version>
|
||||
@@ -55,9 +55,9 @@
|
||||
</licenses>
|
||||
<scm>
|
||||
<tag>master</tag>
|
||||
<url>https://github.com/magese/ik-analyzer-solr7</url>
|
||||
<connection>scm:git:git@github.com:magese/ik-analyzer-solr7.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:magese/ik-analyzer-solr7.git</developerConnection>
|
||||
<url>https://github.com/magese/ik-analyzer-solr</url>
|
||||
<connection>scm:git:git@github.com:magese/ik-analyzer-solr.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:magese/ik-analyzer-solr.git</developerConnection>
|
||||
</scm>
|
||||
<developers>
|
||||
<developer>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.cfg;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.cfg;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.core;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.core;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.core;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.core;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.core;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.core;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.core;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.core;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.core;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.core;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.core;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.dic;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.dic;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.dic;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.lucene;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.lucene;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.lucene;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.lucene;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.query;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.query;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.sample;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IK 中文分词 版本 7.7
|
||||
* IK Analyzer release 7.7
|
||||
* IK 中文分词 版本 8.0.0
|
||||
* IK Analyzer release 8.0.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -21,8 +21,8 @@
|
||||
* 版权声明 2012,乌龙茶工作室
|
||||
* provided by Linliangyi and copyright 2012 by Oolong studio
|
||||
*
|
||||
* 7.7版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7 update by Magese(magese@live.cn)
|
||||
* 8.0.0版本 由 Magese (magese@live.cn) 更新
|
||||
* release 8.0.0 update by Magese(magese@live.cn)
|
||||
*
|
||||
*/
|
||||
package org.wltea.analyzer.sample;
|
||||
@@ -39,10 +39,7 @@ import org.apache.lucene.index.IndexWriterConfig;
|
||||
import org.apache.lucene.index.IndexWriterConfig.OpenMode;
|
||||
import org.apache.lucene.queryparser.classic.ParseException;
|
||||
import org.apache.lucene.queryparser.classic.QueryParser;
|
||||
import org.apache.lucene.search.IndexSearcher;
|
||||
import org.apache.lucene.search.Query;
|
||||
import org.apache.lucene.search.ScoreDoc;
|
||||
import org.apache.lucene.search.TopDocs;
|
||||
import org.apache.lucene.search.*;
|
||||
import org.apache.lucene.store.Directory;
|
||||
import org.apache.lucene.store.RAMDirectory;
|
||||
import org.wltea.analyzer.lucene.IKAnalyzer;
|
||||
@@ -107,10 +104,11 @@ public class LuceneIndexAndSearchDemo {
|
||||
|
||||
//搜索相似度最高的5条记录
|
||||
TopDocs topDocs = isearcher.search(query, 5);
|
||||
System.out.println("命中:" + topDocs.totalHits);
|
||||
long totalHits = topDocs.totalHits.value;
|
||||
System.out.println("命中:" + totalHits);
|
||||
//输出结果
|
||||
ScoreDoc[] scoreDocs = topDocs.scoreDocs;
|
||||
for (int i = 0; i < topDocs.totalHits; i++) {
|
||||
for (int i = 0; i < totalHits; i++) {
|
||||
Document targetDoc = isearcher.doc(scoreDocs[i].doc);
|
||||
System.out.println("内容:" + targetDoc.toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user