Activate adaptive filtering in AlloyDB AI
Stay organized with collections
Save and categorize content based on your preferences.
Preview
This feature is
subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the
Service Specific
Terms .
You can process personal data for
this feature
as outlined in the
Cloud Data
Processing Addendum , subject to the obligations and restrictions described in the
agreement under which you access Google Cloud.
Pre-GA features are available "as is" and might have limited support.
For more information, see the
launch stage descriptions .
This page provides instructions for enabling adaptive filtering in AlloyDB AI, a feature that optimizes filtered vector searches.
Note: Inline filtering is supported only when you use the ScaNN algorithm. Inline filtering is not compatible with the Inverted File (IVF), Inverted File Flat (IVFFlat), or Hierarchical Navigable Small Worlds (HNSW) algorithms.
Enable adaptive filtering
To enable adaptive filtering, you must set the scann.enable_preview_features flag to on.
Note: The scann.enable_preview_features flag is an umbrella for multiple preview features and enables all of them.
gcloud alloydb instances update INSTANCE_ID \
--database-flags scann.enable_preview_features= on \
--region= REGION \
--cluster= CLUSTER_ID \
--project= PROJECT_ID
Replace the following:
INSTANCE_ID : the ID of the instance where you want to enable adaptive filtering.
REGION : the region where your instance is located for example, us-central1.
CLUSTER_ID : the ID of the cluster where your instance is located.
PROJECT_ID : the ID of the project where your cluster is located.
Setting this flag to on activates the adaptive filtering behavior, allowing the query optimizer to dynamically switch between inline and pre-filtering strategies.
What's next
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-08-21 UTC.
[null,null,["Last updated 2026-08-21 UTC."],[],[]]