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:

In[1]:=
Click for copyable input

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

In[2]:=
Click for copyable input
Out[2]=

Without the extra weight, a different ranking is given:

In[3]:=
Click for copyable input
Out[3]=

Scope  (2)

Options  (1)

See Also

TextSearch  ContentFieldOptions

Introduced in 2016
(11.0)