ContainsPhraseOperator: Create a Contains Phrase Search Operator

View source: R/TextOperators.R

ContainsPhraseOperatorR Documentation

Create a Contains Phrase Search Operator

Description

Constructs a 'ContainsPhraseOperator' object for search operations that look for attributes containing a specific phrase. This operator is ideal for scenarios where the search needs to be more precise than just individual words, such as finding an exact phrase within a text attribute.

Usage

ContainsPhraseOperator(attribute, value)

Arguments

attribute

The attribute to be evaluated. This should be the text field within the RCSB PDB that you want to search against.

value

The phrase to search for in the attribute. The search will look for this exact sequence of words within the specified attribute.

Value

An object of class 'ContainsPhraseOperator' that can be used in search queries to retrieve entries where the attribute contains the specified phrase.

Examples

# Search for entries containing a specific phrase in an attribute
operator <- ContainsPhraseOperator(attribute = "rcsb_primary_citation.title",
                                    value = "molecular dynamics")
print(operator)

rPDBapi documentation built on Oct. 19, 2024, 5:08 p.m.