get_attributes method

get_attributes

Gets all the attributes associated with the specified indexed document.

def get_attributes(self, document_key):
    ...
Parameter Type Description
document_key str The document key.

Returns: list[str]: The attributes associated with the specified indexed document.

Example

from groupdocs.search.scaling import Indexer

# `indexer` should be an initialized Indexer instance
# `doc_key` is the key of the document whose attributes you want to retrieve
attributes = indexer.get_attributes(doc_key)
print("Attributes:", attributes)

Aliases

These names call get_attributes too, limited to the overloads listed.

Alias Accepts
get_attributes_file get_attributes_file(document_key)
get_attributes_string get_attributes_string(document_key)

See Also