As part of search engine i have developed an inverted index.
So i have a list which contains elements of the following type
public struct ForwardBarrelRecord
{
public string DocId;
public int hits { get; set; }
public List<int> hitLocation;
}
Now this record is against a single word. The hitLocation contains the locations where a particular word has been found in a document.
Now what i want is to calculate the closeness of elements in List<int> hitLocation
to another List<int> hitLocation
and then if the elements in the List are adjacent then to increase the weight of both records.
Problem that i am having is finding a suitable algorithm for this purpose. Any Help is appreciated