Lucene 基本概念
来源:互联网 发布:大数据的基本概念 编辑:程序博客网 时间:2024/06/10 02:08
Classes used when indexing document with Lucene:
Document(Field Field Field Field Field...)-->Analyzer-->IndexWriter-->Directory
Core Indexing classes:
IndexWriter类: central component of the indexing process.
Directory类:the location of a Lucene index.
Analyzer类:extracting those tokens out of text that should be indexed and eliminating the rest.
Document类:a collection of fields.
Field类:each document in an index contains one or more named fields.
Core Searching classes:
IndexSearcher类: open an index in a read-only mode.
Directory dir = FSDirectory.open(new File("/tmp/index"));IndexSearcher searcher = new IndexSearcher(dir);Query q=new TermQuery(new Term("contents","lucene"));TopDocs hits = searcher.search(q,10);searcher.close();Term类:
Query类:
TermQuery类:
TopDocs类: a simple container of pointers to the top N ranked search results--documents that match a given query.
0 0
- lucene基本概念
- Lucene 基本概念
- Lucene 基本概念
- Lucene基本概念
- Lucene中的基本概念
- Lucene中的基本概念
- Lucene中的基本概念
- lucene和ElasticSearch基本概念
- 了解lucene的基本概念
- lucene和ElasticSearch基本概念
- lucene和ElasticSearch基本概念
- lucene学习--lucene基本概念和流程
- lucene
- Lucene
- lucene
- lucene
- Lucene
- lucene
- 11 Inspiring Mobile App Websites
- NFS
- Agile Software Development --敏捷软件开发
- USACO 3.1 Contact (contact)
- Eclipse字符集设置方式
- Lucene 基本概念
- 关于函数调用
- 好多了会
- loadView学习总结
- 关于linux描述符和权限的问题
- [读书笔记]Servlet学习笔记-设计模式
- 备份MySQL数据库的命令
- sqlplus登录、连接命令
- Python性能鸡汤(转)