lucene segment会包含所有的索引文件,如tim tip等,可以认为是mini的独立索引

简介:

A Lucene index segment can be viewed as a "mini" index or a shard. Each segment is a collection of all needed files for an index, including .tim and .tip. If you list your Lucene index directory, you'll see files belonging to the same segment have the same names with all different types. In fact, if you force a merge, you'll get an index of one single segment.

Each segment  contains an index of a subset of your document collection. Lucene usually creates a new segment when new documents are added to a working index, to avoid (or rather delay and batch later) reindexing cost.

When a search is executed, Lucene will fan that query over all segments, and all the index wide statistics required for relevance ranking (such as idf) are combined, so from the client's perspective, the ranking is the same as searching from an index of one segment. Note that the other famous stat, tf, is per-document, so it is already available at the segment reader layer.

Now things get more interesting when you have Lucene indexes across machines (as the case in Solr Cloud, which is one of the distributed search service built on Lucene). Due to performance and complexity, Solr Cloud don't aggregate global stats across clusters (yet), so each machine would use their own stats on the index it holds (which could be consisted of multiple segments :).

 

摘自:https://www.quora.com/Are-the-individual-tim-and-tip-files-term-dictionaries-of-a-Lucene-index-segment-updated-when-a-new-segment-is-added-to-Lucene














本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/bonelee/p/6668774.html,如需转载请自行联系原作者








相关文章
|
存储 关系型数据库 数据库
Data dictionary header(2) --系统表空间结构(三十四)
Data dictionary header(2) --系统表空间结构(三十四)
|
存储 关系型数据库 MySQL
Xdes&Inode&Seg Header(6) 独立表空间结构(三十二)
Xdes&Inode&Seg Header(6) 独立表空间结构(三十二)
|
存储 索引
File Space Header & xdes(5)FSP HDR独立表空间结构(三十一)
File Space Header & xdes(5)FSP HDR独立表空间结构(三十一)
|
关系型数据库 MySQL Linux
解读InnoDB页面--索引结构
前言 很久之前了解到innodb_space,觉得很强大,可视化了InnoDB页面,但是没有形成文档,总结出来,有一些经常被问到的东东可以用这个查看了。 环境 centos 7 Linux izhp3j8nb7nyq2g923r9fvz 3.
1878 0