lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Willnauer <>
Subject Re: Table Defn and/or ER Diagram of Segment files
Date Mon, 19 Dec 2011 20:20:40 GMT
I think you are confusing something here. BDB can be used as a
"Directory" implementation but a Directory is a simple "blob" store.
BDB only stores binary BLOB which corresponds to a file. AFAIK we
dropped the BDB support entirely a couple of releases ago.
In Lucene you can think of one large table where columns correspond to
fields and rows correspond to documents. Yet the table can be sparse
and each field can habe different properties ie. can store documents
or index them etc.

Each segment is basically a stand-alone lucene index. However, a
logical index is usually composed of multiple segments. During
indexing we periodically flush RAM buffers to disk into one segment.
Since Lucene never writes a files twice (actually there is one but
lets ignore this for now) we need to get rid of deleted docs at some
point and balance the num of segments in the index. This is when
lucene merges segments together into yet another segment. During
search Lucene executes the query on each segment and merges the
results into the top N. Lucene and its segments are "schemaless" so
two segments can have different number of fields and even the
properties of a field can be different.

However, there are no "relations" in lucene so ER diagrams would look
pretty boring  - remember its a reverse index :)

I hope that helps to get started. Go ahead and ask more if you need more info.


On Fri, Dec 16, 2011 at 9:31 PM, Dr. Ray Hoare <> wrote:
> Is there an entity-relationship of the segment files and/or Berkeley
> DB tables (with table definitions)?
> I'm trying understand the segment files of Lucene and know that a
> Berkeley DB can be used to store the directory but can't locate any ER
> diagram or table definitions for the DB.
> Thanks
> Ray
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message