SearchResultObject

SearchResultObject[]

represents a result from TextSearch[] and related functions.

Details

  • The following operations can be used on SearchResultObject[]:
  • Normal[obj]give all results in a list
    Dataset[obj]give all results in a dataset
    obj[1;;n]give the first n results in a list
    obj[1;;n,"Snippet"]give the snippets associated with the first n results
    obj[n]give the n^(th) result
    obj[n,"Snippet"]give the snippet associated with the n^(th) result
    obj[spec,prop]give the specified property of the results selected by spec
    obj["Count"]give a count of the total number of results
  • Each result is given in the form of a ContentObject[] expression.

Examples

Basic Examples  (1)

Get all content objects:

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

Get the top two search results:

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

Get the top search result:

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

Get the number of search results:

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

See Also

TextSearch  TextSearchReport  ContentObject  CreateSearchIndex  SearchIndexObject

Introduced in 2016
(11.0)