There is a new technical requirement, need to extend the source code of the lucene4.x, write the following time-position text to the inverted index, for this reason, I expanded a timetokenizer word breaker, in this word breaker to write the time information
Offsets in offset. A filter is extended, and when the query is last queried, the time information is passed into the filter for the desired time range.
Lucene Inverted index There are two offsets for a word that is offset by a character (Beginoffset and Endoffset) and the other is a position with a word (term) as a unit, with each added position plus 1, If the word has two characters then Endoffset plus 2, Beginoffset equals the last Endoffset.
Source Address: Https://github.com/Jethu1/TimeAnalyzer
Lucene4.6 writes the time information to the offset offset of the inverted index and implements the query by time position