-
大小: 13.1MB文件类型: .rar金币: 1下载: 0 次发布日期: 2023-07-30
- 语言: Java
- 标签: lucene analyzer highlighter
资源简介
很好 很全 这是比较新版的lucene的所有jar包 里面还有对应的demo 和 解说文档 对于搜索引擎是一个很好的工具。
代码片段和文件信息
package org.apache.lucene.demo;
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License Version 2.0
* (the “License“); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing software
* distributed under the License is distributed on an “AS IS“ BASIS
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.FSDirectory;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.Term;
//import org.apache.lucene.index.Term;
/** Deletes documents from an index that do not contain a term. */
public class DeleteFiles {
private DeleteFiles() {} // singleton
/** Deletes documents from an index that do not contain a term. */
public static void main(String[] args) {
String usage = “java org.apache.lucene.demo.DeleteFiles “;
if (args.length == 0) {
System.err.println(“Usage: “ + usage);
System.exit(1);
}
try {
Directory directory = FSDirectory.getDirectory(“index“);
IndexReader reader = IndexReader.open(directory);
Term term = new Term(“path“ args[0]);
int deleted = reader.deleteDocuments(term);
System.out.println(“deleted “ + deleted +
“ documents containing “ + term);
// one can also delete documents by their internal id:
/*
for (int i = 0; i < reader.maxDoc(); i++) {
System.out.println(“Deleting document with id “ + i);
reader.delete(i);
}*/
reader.close();
directory.close();
} catch (Exception e) {
System.out.println(“ caught a “ + e.getClass() +
“\n with message: “ + e.getMessage());
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3716 2008-10-01 11:59 lucene-2.4.0\BUILD.txt
文件 10184 2008-10-05 16:46 lucene-2.4.0\build.xm
文件 122781 2008-10-01 11:59 lucene-2.4.0\CHANGES.txt
文件 502916 2008-10-05 16:45 lucene-2.4.0\contrib\analyzers\lucene-analyzers-2.4.0-javadoc.jar
文件 144343 2008-10-05 16:44 lucene-2.4.0\contrib\analyzers\lucene-analyzers-2.4.0.jar
文件 67457 2008-10-05 16:45 lucene-2.4.0\contrib\ant\lucene-ant-2.4.0-javadoc.jar
文件 18249 2008-10-05 16:44 lucene-2.4.0\contrib\ant\lucene-ant-2.4.0.jar
文件 5637 2008-10-01 11:59 lucene-2.4.0\contrib\benchmark\CHANGES.txt
文件 613891 2008-10-05 16:45 lucene-2.4.0\contrib\benchmark\lucene-benchmark-2.4.0-javadoc.jar
文件 179367 2008-10-05 16:44 lucene-2.4.0\contrib\benchmark\lucene-benchmark-2.4.0.jar
文件 1226 2008-10-01 11:59 lucene-2.4.0\contrib\benchmark\README.enwiki
文件 1245 2008-10-01 11:59 lucene-2.4.0\contrib\CHANGES.txt
文件 139257 2008-10-05 16:45 lucene-2.4.0\contrib\highlighter\lucene-highlighter-2.4.0-javadoc.jar
文件 90925 2008-10-05 16:44 lucene-2.4.0\contrib\highlighter\lucene-highlighter-2.4.0.jar
文件 295593 2008-10-05 16:45 lucene-2.4.0\contrib\instantiated\lucene-instantiated-2.4.0-javadoc.jar
文件 43780 2008-10-05 16:44 lucene-2.4.0\contrib\instantiated\lucene-instantiated-2.4.0.jar
文件 27466 2008-10-05 16:45 lucene-2.4.0\contrib\lucli\lucene-lucli-2.4.0-javadoc.jar
文件 16276 2008-10-05 16:44 lucene-2.4.0\contrib\lucli\lucene-lucli-2.4.0.jar
文件 666 2008-10-01 11:59 lucene-2.4.0\contrib\lucli\README
文件 63489 2008-10-05 16:45 lucene-2.4.0\contrib\memory\lucene-memory-2.4.0-javadoc.jar
文件 54899 2008-10-05 16:44 lucene-2.4.0\contrib\memory\lucene-memory-2.4.0.jar
文件 146655 2008-10-05 16:45 lucene-2.4.0\contrib\misc\lucene-misc-2.4.0-javadoc.jar
文件 53054 2008-10-05 16:44 lucene-2.4.0\contrib\misc\lucene-misc-2.4.0.jar
文件 184 2008-10-01 11:59 lucene-2.4.0\contrib\miscellaneous\README.txt
文件 91197 2008-10-05 16:45 lucene-2.4.0\contrib\queries\lucene-queries-2.4.0-javadoc.jar
文件 32972 2008-10-05 16:44 lucene-2.4.0\contrib\queries\lucene-queries-2.4.0.jar
文件 1319 2008-10-01 11:59 lucene-2.4.0\contrib\queries\README.txt
文件 71763 2008-10-05 16:45 lucene-2.4.0\contrib\regex\lucene-regex-2.4.0-javadoc.jar
文件 13236 2008-10-05 16:44 lucene-2.4.0\contrib\regex\lucene-regex-2.4.0.jar
文件 5372 2008-10-05 16:44 lucene-2.4.0\contrib\similarity\lucene-similarity-2.4.0.jar
............此处省略4041个文件信息
- 上一篇:学生就业管理系统
- 下一篇:200多个JAVA经典游戏源代码和资源及JAR包及说明
相关资源
- Java Web+爬虫+lucene 大学新闻网
- Lucene项目(华电内部文档搜索系统)
- 解密搜索引擎技术实战Lucene&Java精华版
- 解密搜索引擎技术实战Lucene&Java精华版
- lucene3.0.0jar及IKAnalyzer
- Lucene实现小型信息检索系统
- 基于Lucene的小型搜索引擎
- MemoryAnalyzer-1.2.0.20120530-win32.win32.x86_
- Lucene7.0.1 中文完整Jar包 包含所有jar
- lucene4.6.0所有jar包集合
- MemoryAnalyzer-1.9.1.20190826-macosx.cocoa.x86
- lucene检索代码,自己总结的非常详细
- 解密搜索引擎技术实战Lucene&Java精华版
- luceneDemo创建索引+关键字查询
- Lucene 2.9.2 Jar包
- solr4的IK中文分词器IKAnalyzer2012FF_u1.j
- lucene-demos-2.9.1.jar
- lucene对txt文件做全文检索源码
- lucene-suggest-5.0.0.jar
- Spark大数据中文分词统计Java工程源码
- Lucene3.0.1 jar包
- IK_CAnalyzer.jar
- IK-Analyzer-6.6.2
- 几种分词工具的jar包IKAnalyzer、hanlp、
- IBM HeapAnalyzer 内存分析工具 2014最新版
- Thread Dump Analyzer - tda-bin-2.3.3
- java lucene性能优化 方案(支持千万级
- Java Lucene 搜索入门
- java lucene搜索 常用
- lucene搜索引擎
评论
共有 条评论