SearchAdjustment

SearchAdjustment[query,w]

represents a component of a search query that is to be treated as having weight w.

SearchAdjustment[query,,opts]

represents a component of a search query with certain options.

Details and Options

  • Query components without SearchAdjustment[] are effectively treated as having weight 1.
  • In SearchAdjustment[query,w], larger weights w make this component be considered more important for purposes of ranking search results.
  • Possible options for SearchAdjustment include:
  • MaxWordGap0maximum gap in words allowed between tokens

Examples

open allclose all

Basic Examples  (1)

Create an example index:

Give more weight to documents containing the word "dog":

Without the extra weight, a different ranking is given:

Scope  (2)

Queries can have multiple adjusted components:

If the given weight is less than 1, the adjusted component is given less importance:

Options  (1)

MaxWordGap  (1)

Allow a gap of 1 word to occur between "some" and "extracts":

Introduced in 2016
 (11.0)