You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by hu andy <an...@gmail.com> on 2006/03/14 13:37:58 UTC

who can tell me how lucene search in the index files

I see there are seven different files with extentions .fnm .tis and etc. I
just can't make sure how it looks up in the .tis file. Does lucene use
Binary-Search to locate the term?

Re: who can tell me how lucene search in the index files

Posted by Daniel Noll <da...@nuix.com.au>.
hu andy wrote:
> I see there are seven different files with extentions .fnm .tis and etc. I
> just can't make sure how it looks up in the .tis file. Does lucene use
> Binary-Search to locate the term?

See TermInfosReader.

It loads the .tii file into memory, which contains one in every N 
entries of the .tis file and points into the real locations in the .tis 
file.

When Lucene looks for a term, it does a binary search through this 
reduced index to find which segment of the .tis file the term is in, and 
then scans through the .tis file linearly until it finds the term.

Daniel

-- 
Daniel Noll

Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia    Ph: +61 2 9280 0699
Web: http://www.nuix.com.au/                        Fax: +61 2 9212 6902

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org