Document vector query helpers#3078
Conversation
Appwrite WebsiteProject ID: Website (appwrite/website)Project ID: Tip Each function runs in its own isolated container with custom environment variables |
Greptile SummaryThis PR adds documentation for three new vector query helpers (
Confidence Score: 4/5Safe to merge after verifying the server-swift method signature and confirming the VectorsDB/TablesDB terminology. The change is purely documentation with no runtime code modified. The multicode block structure, HTTP JSON format, and most SDK examples are consistent with existing geo-query patterns. The server-swift parameter label inconsistency and VectorsDB terminology mismatch are the two areas that warrant verification before merging. src/routes/docs/products/databases/queries/+page.markdoc — specifically the server-swift examples and the introductory prose of the vector queries section. Important Files Changed
Reviews (1): Last reviewed commit: "Document vector query helpers" | Re-trigger Greptile |
| ```client-apple | ||
| Query.vectorDot("embeddings", vector: [0.12, 0.24, 0.48]) | ||
| Query.vectorCosine("embeddings", vector: [0.12, 0.24, 0.48]) | ||
| Query.vectorEuclidean("embeddings", vector: [0.12, 0.24, 0.48]) | ||
| ``` |
There was a problem hiding this comment.
server-swift uses labeled parameter inconsistent with geo-query convention
The existing geo-query server-swift examples omit the parameter label (e.g., Query.distanceEqual("location", [-73.9851, 40.7589], 200)), but the new vector-query server-swift examples use vector: (e.g., Query.vectorDot("embeddings", vector: [0.12, 0.24, 0.48])). Meanwhile the client-apple (iOS SDK) block correctly uses the label for both. If the server Swift SDK's vectorDot method follows the same unlabeled convention as distanceEqual, the generated docs would show incorrect call syntax that won't compile for users copying the snippet. Could you confirm the actual server-swift SDK method signature?
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
|
||
| # Vector queries {% #vector-queries %} | ||
|
|
||
| Vector query helpers search vector attributes by similarity to a query vector. Use them with VectorsDB document list endpoints and pass a numeric vector with the same dimensions as the stored embeddings. |
There was a problem hiding this comment.
"VectorsDB document list endpoints" terminology is inconsistent with the rest of the page
This page's description and all code examples refer exclusively to TablesDB / listRows. Calling out "VectorsDB document list endpoints" here implies these helpers only work with a separate VectorsDB product — but there's no other mention of VectorsDB anywhere on the page, and the same phrasing appears in the changelog entry. If VectorsDB is a distinct product, the cross-linking and context need clarification; if it's not, the reference should be updated to match the TablesDB terminology used throughout.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!


Summary
vectorDot,vectorCosine, andvectorEuclideanto the Databases queries docsValidation
git diff --checkbunis not installed;pnpm install --frozen-lockfilefails becausepnpm-lock.yamlis out of sync withpackage.json