DocumentWeightingRules
is an option for TextSearch and related functions that allows the specification of weights for documents based on the values of fields in the search index.
Details
- DocumentWeightingRules -> <"field1" -> <val11 -> weight11, val12 -> weight12, … >, "field2" -> <… >, … > means that a document with value valij for field "fieldi" will have its score multiplied by weightij.
- The fields used for DocumentWeightingRules need to have the "Stored" or "BulkRetrievalOptimized" option set to True in ContentFieldOptions.
- For performance purposes, "BulkRetrievalOptimized" is to be preferred to "Stored".
Examples
open allclose allBasic Examples (1)
Possible Issues (2)
Document weighting only applies when searching on an index, not on files:
The fields used for document weighting must have "Stored" or "BulkRetrievalOptimized" set to True in the ContentFieldOptions of the index:
Text
Wolfram Research (2017), DocumentWeightingRules, Wolfram Language function, https://reference.wolfram.com/language/ref/DocumentWeightingRules.html.
CMS
Wolfram Language. 2017. "DocumentWeightingRules." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DocumentWeightingRules.html.
APA
Wolfram Language. (2017). DocumentWeightingRules. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DocumentWeightingRules.html