The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend theVectorQueryclass.
Properties
query
getquery():Query<AppModelType,DbModelType>;
The query whose results participants in the vector search. Filtering performed by the query will apply before the vector search.
Plans and optionally executes this vector search query. Returns a Promise that will be resolved with the planner information, statistics from the query execution (if any), and the query results (if any).
A Promise that will be resolved with the planner information, statistics from the query execution (if any), and the query results (if any).
Compares this object with the given object for equality.
This object is considered "equal" to the other object if and only ifotherperforms the same vector distance search as thisVectorQueryand the underlying Query ofothercompares equal to that of this object usingQuery.isEqual().
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Class VectorQuery (7.11.0)\n\nVersion latestkeyboard_arrow_down\n\n- [7.11.0 (latest)](/nodejs/docs/reference/firestore/latest/firestore/vectorquery)\n- [7.9.0](/nodejs/docs/reference/firestore/7.9.0/firestore/vectorquery)\n- [7.7.0](/nodejs/docs/reference/firestore/7.7.0/firestore/vectorquery)\n- [7.6.0](/nodejs/docs/reference/firestore/7.6.0/firestore/vectorquery)\n- [7.5.0](/nodejs/docs/reference/firestore/7.5.0/firestore/vectorquery)\n- [7.4.0](/nodejs/docs/reference/firestore/7.4.0/firestore/vectorquery)\n- [7.3.1](/nodejs/docs/reference/firestore/7.3.1/firestore/vectorquery)\n- [7.2.0](/nodejs/docs/reference/firestore/7.2.0/firestore/vectorquery)\n- [7.1.0](/nodejs/docs/reference/firestore/7.1.0/firestore/vectorquery)\n- [6.4.1](/nodejs/docs/reference/firestore/6.4.1/firestore/vectorquery)\n- [6.3.0](/nodejs/docs/reference/firestore/6.3.0/firestore/vectorquery)\n- [6.0.0](/nodejs/docs/reference/firestore/6.0.0/firestore/vectorquery)\n- [5.0.2](/nodejs/docs/reference/firestore/5.0.2/firestore/vectorquery)\n- [4.15.1](/nodejs/docs/reference/firestore/4.15.1/firestore/vectorquery)\n- [4.14.2](/nodejs/docs/reference/firestore/4.14.2/firestore/vectorquery)\n- [4.9.8](/nodejs/docs/reference/firestore/4.9.8/firestore/vectorquery) \nA query that finds the documents whose vector fields are closest to a certain query vector. Create an instance of `VectorQuery` with .\n\nPackage\n-------\n\n[@google-cloud/firestore](../overview.html)\n\nRemarks\n-------\n\nThe constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `VectorQuery` class.\n\nProperties\n----------\n\n### query\n\n get query(): Query\u003cAppModelType, DbModelType\u003e;\n\nThe query whose results participants in the vector search. Filtering performed by the query will apply before the vector search.\n\nMethods\n-------\n\n### _getResponse(explainOptions)\n\n _getResponse(explainOptions?: firestore.ExplainOptions): Promise\u003cQueryResponse\u003cVectorQuerySnapshot\u003cAppModelType, DbModelType\u003e\u003e\u003e;\n\n### explain(options)\n\n explain(options?: firestore.ExplainOptions): Promise\u003cExplainResults\u003cVectorQuerySnapshot\u003cAppModelType, DbModelType\u003e\u003e\u003e;\n\nPlans and optionally executes this vector search query. Returns a Promise that will be resolved with the planner information, statistics from the query execution (if any), and the query results (if any).\n\nA Promise that will be resolved with the planner information, statistics from the query execution (if any), and the query results (if any).\n\n### get()\n\n get(): Promise\u003cVectorQuerySnapshot\u003cAppModelType, DbModelType\u003e\u003e;\n\nExecutes this vector search query.\n\n### isEqual(other)\n\n isEqual(other: firestore.VectorQuery\u003cAppModelType, DbModelType\u003e): boolean;\n\nCompares this object with the given object for equality.\n\nThis object is considered \"equal\" to the other object if and only if `other` performs the same vector distance search as this `VectorQuery` and the underlying Query of `other` compares equal to that of this object using `Query.isEqual()`."]]