Skip to content

Docs: Add FLOAT_VECTOR overview example - #297

Closed
nightcityblade wants to merge 1 commit into
crate:mainfrom
nightcityblade:docs/issue-190
Closed

Docs: Add FLOAT_VECTOR overview example#297
nightcityblade wants to merge 1 commit into
crate:mainfrom
nightcityblade:docs/issue-190

Conversation

@nightcityblade

Copy link
Copy Markdown
Contributor

Fixes #190

Adds a focused FloatVector example to the feature overview showing how to define an embedding column, store a vector, and build a knn_match query. It also links to the complete vector guide and updates the extension-type introduction so it no longer implies the dialect has only two extension types.

Testing

  • make html
  • make linkcheck
  • git diff --check

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 437d57b1-7d15-42f0-b399-a3a83cdf4861

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

florinutz
florinutz previously approved these changes Aug 17, 2026
@florinutz
florinutz self-requested a review August 17, 2026 09:29

@florinutz florinutz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you! I have some comments

Comment thread docs/overview.rst
change, the :ref:`UPDATE <crate-reference:dml-updating-data>` statement
sent to CrateDB will include all of the ``ObjectArray`` data.

.. _floatvector:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this example needs a link to its anchor, right?

Comment thread docs/overview.rst
Values can be supplied as lists of floating-point numbers. To find nearby
vectors, use ``knn_match`` in a query:

>>> item = SearchIndex(name='example', embedding=[1.0, 2.0, 3.0])

@florinutz florinutz Aug 17, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need numpy the moment you save a vector, even if you handed it an ordinary list. If so, would be maybe nice to mention it (the [vector] extra) somewhere.

Comment thread docs/overview.rst
>>> item = SearchIndex(name='example', embedding=[1.0, 2.0, 3.0])
>>> session.add(item)
>>> session.commit()
>>> query = session.query(SearchIndex.name).filter(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about the results here? probably needs a REFRESH TABLE if you get [] results without it.

Comment thread docs/overview.rst Outdated
... knn_match(SearchIndex.embedding, [1.0, 2.0, 2.9], 10)
... )

See the :doc:`vector type guide <working-with-types>` for a complete example,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add an anchor for vectors in the target page, and link to the anchor

@florinutz
florinutz dismissed their stale review August 17, 2026 09:47

hurried a bit :D

@nightcityblade

Copy link
Copy Markdown
Contributor Author

Replacement PR: #298

During follow-up, an amend in a shallow clone briefly disconnected this source branch, causing GitHub to auto-close the PR. I rebuilt the change from current upstream main on a fresh branch, preserved the reviewed changes, applied the requested follow-ups, and reran validation. Apologies for the disruption.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation feedback on /docs/overview.rst: Educate about FLOAT_VECTOR

3 participants