|
|
|
|
|
Re: Information about JDT index format [message #853701 is a reply to message #852077] |
Mon, 23 April 2012 04:58  |
Eclipse User |
|
|
|
Here is an overview of the indexing process. The file is parsed and depending upon the type of the 'name', a key[1] is generated and added into the particular category (eg: type decl, type ref, method decl, method ref,etc). for that file. This is stored in Memory (MemoryIndex.java). Periodically this goes into the disk(DiskIndex.java). Here all documents (file names) are first stored and then all the keys and the offset of the document the particular key is present, are stored in an hashtable.
For eg: the hash table for method declarations could contain elements like this
{foo/1->[0][9]} - means a method of name 'foo' with 1 argument is in documents specified at offset 0 and 9 in the document table.
During the search, a key will be generated depending upon the item to be searched and the indexer will just return the file names that contains the key.
> What is meant by "no resolved is stored in the index"?
'No resolved is stored in the index' means that if for eg: you are using String in your code, the index will not store java.util.String but will only store String. It will not resolve to the item.
Hopefully this helps.
[1] Key is an encoding of the name which can be used for easy searching. Look at *Pattern#createIndexKey() for more information.
|
|
|
Powered by
FUDForum. Page generated in 0.07650 seconds