Summary: | [Expand All]
public interface

# SearchableMetadataField

implements MetadataField<T>

com.google.android.gms.drive.metadata.SearchableMetadataField<T>

Known Indirect Subclasses SearchableCollectionMetadataField<T>, SearchableOrderedMetadataField<T>
SearchableCollectionMetadataField<T> | Interface for metadata fields which hold a collection of values.
SearchableOrderedMetadataField<T> | Interface for metadata fields which holds an ordered value (such as a date) and which can be used for range queries.

## Class Overview

Interface for metadata fields that can be used to filter results as part of file queries. Implementation of this interface (such as the static values in `SearchableField`) can be used to create filters for file or folder queries.

For example, the following code will find all files that are starred and have the MIME type type "text/plain":

``

     Filter starredFilter = Filters.eq(SearchableField.STARRED, true);
     Filter mimeTypeFilter = Filters.eq(SearchableField.MIME_TYPE, "text/plain");
     Query query = new Query.Builder().addFilters(starredFilter, mimeTypeFilter).build();
     for (Metadata metadata : Drive.DriveApi.query(apiClient, query).await().getMetadataBuffer()) {
         System.out.println(metadata.getTitle());
     }