GetSearchStringParameterNode


@ExperimentalAppSearchApi
class GetSearchStringParameterNode : FunctionNode


FunctionNode that represents the getSearchStringParameter function.

The getSearchStringParameter function retrieves the String parameter stored at the index in the list provided by getSearchStringParameters.

The String parameter can be used in a query and is treated as plain text. It will be segmented, normalized, and stripped of punctuation. Operators such as AND will be treated as plain text while operators such as negation ("-") and property restricts (":") will be treated as punctuation and removed.

So for the query `foo OR getSearchStringParameter(0)`, where getSearchStringParameter(0) contains "bar AND sender:recipient", the string will be segmented into

  • bar
  • AND
  • sender
  • :
  • recipient
Then the punctuation will be removed and the remaining tokens ANDed together. This means the resulting query is equivalent to the query `foo OR (bar AND and AND sender AND recipient)`.

Summary

Public constructors

GetSearchStringParameterNode(searchStringIndex: Int)

Constructor for GetSearchStringParameterNode that takes in the index of the SearchString parameter provided in getSearchStringParameters.

Public functions

Boolean
equals(o: Any!)
String

Returns the name of the function represented by GetSearchStringParameterNode.

Int

Returns the index of the SearchString parameter to be retrieved from getSearchStringParameters.

Int
Unit
setSearchStringIndex(searchStringIndex: Int)

Sets the index of the SearchString parameter provided in getSearchStringParameters to be represented by GetSearchStringParameterNode.

String

Returns the string representation of GetSearchStringParameterNode.

Inherited Constants

From androidx.appsearch.ast.FunctionNode
const String!
FUNCTION_NAME_GET_SEARCH_STRING_PARAMETER = "getSearchStringParameter"

Name of the query function represented by androidx.appsearch.ast.query.GetSearchStringParameterNode.

const String!

Name of the query function represented by androidx.appsearch.ast.query.HasPropertyNode.

const String!
FUNCTION_NAME_PROPERTY_DEFINED = "propertyDefined"

Name of the query function represented by androidx.appsearch.ast.query.PropertyDefinedNode.

const String!

Name of the query function represented by androidx.appsearch.ast.query.SearchNode.

const String!

Name of the query function represented by androidx.appsearch.ast.query.SemanticSearchNode.

Inherited functions

From androidx.appsearch.ast.Node
(Mutable)List<Node!>

Get a list of the node's child Nodes.

Public constructors

GetSearchStringParameterNode

Added in 1.1.0-alpha07
GetSearchStringParameterNode(searchStringIndex: Int)

Constructor for GetSearchStringParameterNode that takes in the index of the SearchString parameter provided in getSearchStringParameters.

Public functions

equals

fun equals(o: Any!): Boolean

getFunctionName

Added in 1.1.0-alpha07
fun getFunctionName(): String

Returns the name of the function represented by GetSearchStringParameterNode.

getSearchStringIndex

Added in 1.1.0-alpha07
fun getSearchStringIndex(): Int

Returns the index of the SearchString parameter to be retrieved from getSearchStringParameters.

hashCode

fun hashCode(): Int

setSearchStringIndex

Added in 1.1.0-alpha07
fun setSearchStringIndex(searchStringIndex: Int): Unit

Sets the index of the SearchString parameter provided in getSearchStringParameters to be represented by GetSearchStringParameterNode.

toString

fun toString(): String

Returns the string representation of GetSearchStringParameterNode.

The string representation of GetSearchStringParameterNode is the function name followed by the searchStringIndex surrounded by parentheses. For example, the string representation of GetSearchStringParameterNode(1) is `getSearchStringParameter(1)`.