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:
  • MaxWordGap 0maximum 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":

Wolfram Research (2016), SearchAdjustment, Wolfram Language function, https://reference.wolfram.com/language/ref/SearchAdjustment.html.

Text

Wolfram Research (2016), SearchAdjustment, Wolfram Language function, https://reference.wolfram.com/language/ref/SearchAdjustment.html.

CMS

Wolfram Language. 2016. "SearchAdjustment." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SearchAdjustment.html.

APA

Wolfram Language. (2016). SearchAdjustment. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SearchAdjustment.html

BibTeX

@misc{reference.wolfram_2024_searchadjustment, author="Wolfram Research", title="{SearchAdjustment}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/SearchAdjustment.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_searchadjustment, organization={Wolfram Research}, title={SearchAdjustment}, year={2016}, url={https://reference.wolfram.com/language/ref/SearchAdjustment.html}, note=[Accessed: 21-December-2024 ]}