Lucene Note Series (3) file structure of--lucene

Source: Internet
Author: User

Lucene's file structure is a hierarchical structure.

The Lucene file hierarchy contains:

If you want to make an analogy:

The index here is equivalent to the table in the database, and when the record in the table reaches a certain amount, we will partition the table.

The section here is equivalent to the partition of the table.

In other words, the index can be decomposed into multiple segments.

The records in the data table are saved in separate partitions, where the documents are equivalent to the records in the database tables. Different documents are saved in different segments.

Slightly different from the partitioning of the table, the segments here can be combined into a new segment.

An index contains multiple segments, each of which contains one or more documents, and the document contains multiple fields that can be divided into one or more lexical elements.


Forward information and reverse information are saved in the Lucene index.

Forward information: the inclusion relationship of the index to the word is saved hierarchically.

Index-Segment-document-domain-word

An index contains which segments, which documents each segment contains, what fields are included in the document, and what the fields are divided into.


Inverse information: the mapping of word-to-document relationships.

In the previous article in this series (1), we define this mapping from Word to document as an inverted table. With the inverted table, we can see which documents each word appears in.







Lucene Note Series (3) file structure of--lucene

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.