Skip to content

Commit

Permalink
Add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
adelapena committed Jun 24, 2024
1 parent 9b9602d commit 7dea0ac
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions doc/modules/cassandra/pages/cql/functions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,36 @@ For every xref:cql/types.adoc#native-types[type] supported by CQL, the function
Conversely, the function `blobAsType` takes a 64-bit `blob` argument and converts it to a `bigint` value.
For example, `bigintAsBlob(3)` returns `0x0000000000000003` and `blobAsBigint(0x0000000000000003)` returns `3`.

[[index-functions]]
===== Index functions

====== `sai_analyze`

The `sai_analyze` functions returns the tokens that a SAI index will generate for a certain text value. The arguments
are that text value and the JSON configuration of the SAI analyzer. This JSON configuration is the same as the one used
to create the SAI index. For example, this function call:

[source,cql]
----
sai_analyze('johnny apples seedlings',
'{
"tokenizer": {"name": "whitespace"}
}')
----
Will return `['johnny', 'apples', 'seedlings']`

This other function call:
[source,cql]
----
sai_analyze('johnny apples seedlings',
'{
"tokenizer": {"name": "whitespace"},
"filters": [{"name": "porterstem"}]
}')
----
Will return `['johnni', 'appl', 'seedl']`


[[vector-functions]]
===== Vector functions

Expand Down

1 comment on commit 7dea0ac

@cassci-bot
Copy link

Choose a reason for hiding this comment

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

Build rejected: 1 NEW test failure(s) in 2 builds., Build 2: ran 15064 tests with 1 failures and 112 skipped.
Butler analysis done on ds-cassandra-pr-gate/CNDB-9422-vsearch vs last 16 runs of ds-cassandra-build-nightly/main.
org.apache.cassandra.index.sai.disk.vector.VectorCompressionTest.testAda002: test failed in the recent build. No failures on upstream;
branch story: [F+] vs upstream: [++++++++++++++++++++++++++++++++++++++++++++++++]; [NEW]
butler comparison

Please sign in to comment.