lucene基本原理
1.術語
lucene 在存儲它的全文索引結構時,是有層次結構的,這涉及到5個層次:索引(Index);段(Segment);文檔(Document);域(Field);詞(Term),他們的關系如下圖所示:(lucene 索引存儲結構概念圖)
下圖是Lucene生成的索引的一個實例,右邊是對這5個層次的描述:
?
2.基本原理
2.1 lucene架構
?
2.2 創(chuàng)建索引
?
?
| ?IndexWriter?W = new IndexWriter(FSDirectory.open(indexdir), new? StandardAnalyzer(version.LUCENE_30,IndexWriter.MaxFieldLength.UNLIMITED)); |
2.3 查詢索引
?
3.參考資料
【1】https://blog.csdn.net/ghj1976/article/details/5586329
【2】https://sebol.webs.com/architectureoverview.htm
【3】https://sebol.webs.com/creatingaluceneindex.htm
【4】https://sebol.webs.com/searchingtheindex.htm
轉載于:https://www.cnblogs.com/davidwang456/p/9933512.html
總結
以上是生活随笔為你收集整理的lucene基本原理的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 资深大牛吐血总结:如何成为一名合格的云架
- 下一篇: lucene源码分析(1)基本要素