Lucene4.6 writes the time information to the offset offset of the inverted index and implements the query by time position

Source: Internet
Author: User

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

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.