> For the complete documentation index, see [llms.txt](https://liuzhenglaichn.gitbook.io/system-design/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://liuzhenglaichn.gitbook.io/system-design/todo-1/lucene.md).

# Lucene

An java library for searching and indexing in one machine

Data -> lucene types -> index to local files

Types:

* Document: an object contains different fields, it is similar to JSON
* Index: contains multiple documents
* Fields: like variable in a class
* Terms: smallest unit after tokenization
