support solr 8.0.0
This commit is contained in:
parent
fa1451042b
commit
7b0d009d32
14
pom.xml
14
pom.xml
|
@ -4,16 +4,16 @@
|
|||
|
||||
<groupId>com.github.magese</groupId>
|
||||
<artifactId>ik-analyzer</artifactId>
|
||||
<version>7.7.1</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.1</description>
|
||||
<description>IK-Analyzer for solr 7-8</description>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<lucene.version>7.7.1</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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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.1
|
||||
* IK Analyzer release 7.7.1
|
||||
* 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.1版本 由 Magese (magese@live.cn) 更新
|
||||
* release 7.7.1 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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue