Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

SearchQueryString

SearchQueryString["query"]
represents a search engine-style query in TextSearch and related functions.

DetailsDetails

  • The following can be used within the query:
  • term1 term2 terms that should all be searched for
    "term1 term2 "a string of terms that must occur literally
    +terma term that must occur
    -terma term that must not occur
    term~a term that should occur at least approximately
    "term1 term2 "~na string of terms that can occur at most n words apart
    field:forma form that should occur within a given field
    form^ba form that is to be boosted by b for purposes of ranking
  • The following additional and alternate forms are also supported:
  • term1 AND term2 AND terms that must all occur
    term2 OR term2 OR terms where at least one must occur
    NOT terma term that must not occur
    (query)grouping within a query string
    \ca character such as + or : that must occur verbatim

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Matching an exact phrase:

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

A sequence of terms is interpreted as ContainsAny by default:

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

Searching a particular field:

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

Require "dog" but disallow "Alice":

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

A Boolean query where the weight of "lorem" is reduced:

In[5]:=
Click for copyable input
Out[5]=
Introduced in 2016
(11.0)