Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejavascript
titleScoring parameters - manual significance weighting
{
	"score": {
		// See preceding sections for other parameters
		sourceWeights: { string: double },
		typeWeights: { string: double },
		tagWeights: { string: double },
		// See following sections for other parameters
}

The 3 fields listed above allow users to adjust document scores manually. This can be useful when, for example, a source that is known to contain relatively low intelligence documents scores high because each document has many common entities, particularly when those entities are unique to the source (hence queries involving that source will tend to give those entities a higher significance).

The weights are in formats like this:

Code Block
{
//..
	"sourceWeights": { 
		"washingtondc.IncidentReport": 0.5,  // halve scores from the source with this key (source.key)
		"arstechnica.com.tech-policy.2012.10.last-android-vendor-f.147.4.": 1.5 // increase documents from this source by 50%
	}
	"typeWeights": {
		"Record": 2.0, // Any documents of source.type "Record" that don't match a source weight
		"Report": 0.75, //(etc)
	}
	"tagWeights": {
		"database": 1.5, // If a document has this tag, multiply its total score by 1.5
		"largeReport": 0.25 // (averaged across all matching tags)
	}
//...
}

The weights are applied as follows:

  • First the source weights are applied.
  • If no source weight matches the document, then the type weights are applied.
  • If no type weight matches the document, then a tag weight is generated by averaging all matching entries from the "tagWeights" map.
  • If no weight matches the document, then its total score is preserved.
Code Block
languagejavascript
titleScoring parameters - time proximity
{
	"score": {
		// See preceding sections for other parameters
		"timeProx":{
			"time": string,
			"decay": string
		},
		// See following sections for other parameters
	}
}

...