Keyoti SearchUnit API Docs
CalculateWordRelevancies Method (wordsList)
API DocumentationKeyoti.SearchEngine.DocumentsDocumentCalculateWordRelevancies(WordCollection)
Keyoti SearchUnit v6
Calculate the weight field value for the words in the list.
Declaration Syntax
C#C#Visual BasicVisual BasicVisual C++Visual C++F#F#
protected virtual void CalculateWordRelevancies(
	WordCollection wordsList
)
protected virtual void CalculateWordRelevancies(
	WordCollection wordsList
)
Protected Overridable Sub CalculateWordRelevancies ( 
	wordsList As WordCollection
)
Protected Overridable Sub CalculateWordRelevancies ( 
	wordsList As WordCollection
)
protected:
virtual void CalculateWordRelevancies(
	WordCollection^ wordsList
)
protected:
virtual void CalculateWordRelevancies(
	WordCollection^ wordsList
)
abstract CalculateWordRelevancies : 
        wordsList : WordCollection -> unit 
override CalculateWordRelevancies : 
        wordsList : WordCollection -> unit 
abstract CalculateWordRelevancies : 
        wordsList : WordCollection -> unit 
override CalculateWordRelevancies : 
        wordsList : WordCollection -> unit 
Parameters
wordsList (WordCollection)
WordCollection of Word objects, with inBody, in Title, inURL fields filled
Remarks
This method defines the relationship between the occurrences (hits) in the document and the weight of the words in the document. Eg. A document contains 4 words; "this", "is", "this", "example". The document's title is; "example" The document's URL is; http://localhost/example.html If phrase matching is enabled, when the build is performed the wordsList parameter will contain Word objects with the following data:
 Copy imageCopy
wordsList[0] = "this", inUri=0, inTitle=0, inBody=1
wordsList[1] = "is",   inUri=0, inTitle=0, inBody=1
wordsList[2] = "this", inUri=0, inTitle=0, inBody=1
wordsList[3] = "example", inUri=1, inTitle=1, inBody=1
If phrase matching is disabled, when the build is performed the wordsList parameter will contain Word objects with the following data:
 Copy imageCopy
wordsList[0] = "this", inUri=0, inTitle=0, inBody=2
wordsList[1] = "is",   inUri=0, inTitle=0, inBody=1
wordsList[2] = "example", inUri=1, inTitle=1, inBody=1
This method is then called to calculate the Weight property in the Word objects (by default it uses the weight coefficients). This method can therefore be overridden with custom rules for weighting.

Assembly: Keyoti4.SearchEngine.Core (Module: Keyoti4.SearchEngine.Core.dll) Version: 2015.6.15.120