Skip to main content

Drop Predicate Index

Schema

This request accepts an optional schema field. When it is omitted, the server uses the public schema. Set schema to target a store in another schema.

Removes an existing predicate index from an AI store.

Click to expand source code
TypeScript
import { createAiClient } from "ahnlich-client-node";
import { DropPredIndex } from "ahnlich-client-node/grpc/ai/query_pb";

async function dropPredicateIndex() {
const client = createAiClient("127.0.0.1:1370");

await client.dropPredIndex(
new DropPredIndex({
store: "ai_store",
schema: "analytics",
predicates: ["brand"],
errorIfNotExists: true,
})
);

console.log("Predicate index dropped");
}

dropPredicateIndex();

Parameters

ParameterTypeRequiredDescription
storestringYesThe name of the AI store
predicatesstring[]YesList of predicate indices to remove
errorIfNotExistsbooleanNoIf true, throws error if index doesn't exist