- All Implemented Interfaces:
public class IndexWriterWithTFLOC
- extends AbstractIndexWriter
A implementation of IndexWriter, creating word index with TF and location.
- See Also:
Create index of a Word with TF and location.
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void createIndex(Word w,
- Create index of a Word with TF and location.
The "index" created might be like below:
The first field "22" means the word did appear in Page with id 22, the
Second field "0.166667" means the TF of the word in a page, and "0,1"
represents the locations of the word. For example:
"I have a cat. You have a dog. He is so funny."
The word "have" appear in first sentence and second, so locations of the
word in the text is "0,1". The text have 12 words, so the TF is 2/12 =
0.166667. Suppose the id of this text is "22", and then index of this
word in the text is "22-0.166667-0,1".
- Specified by:
createIndex in class
w - which need to create index.
urlId - the id of page which contains the word.