table-comments-vs
INSERT INTO cycling.comments_vs (record_id, id, commenter, comment, created_at, comment_vector) VALUES (now(),e7ae5cf3-d358-4d99-b900-85902fda9bb0, 'Alex','Raining too hard should have postponed','2017-02-14 12:43:20-0800',[0.45, 0.09, 0.01, 0.2, 0.11]);
INSERT INTO cycling.comments_vs (record_id, id, commenter, comment, created_at, comment_vector) VALUES (now(),e7ae5cf3-d358-4d99-b900-85902fda9bb0,'Alex','Second rest stop was out of water','2017-03-21 13:11:09.999-0800',[0.99, 0.5, 0.99, 0.1, 0.34]);
INSERT INTO cycling.comments_vs (record_id, id, commenter, comment, created_at, comment_vector) VALUES (now(),e7ae5cf3-d358-4d99-b900-85902fda9bb0,'Alex','LATE RIDERS SHOULD NOT DELAY THE START','2017-04-01 06:33:02.16-0800',[0.9, 0.54, 0.12, 0.1, 0.95]);
INSERT INTO cycling.comments_vs (record_id, id, commenter, comment, created_at, comment_vector) VALUES (now(),c7fceba0-c141-4207-9494-a29f9809de6f,'Amy','The gift certificate for winning was the best',totimestamp(now()),[0.13, 0.8, 0.35, 0.17, 0.03]);
INSERT INTO cycling.comments_vs (record_id, id, commenter, comment, created_at, comment_vector) VALUES (now(),c7fceba0-c141-7207-9494-a29f9809de6f,'Amy','The <B>gift certificate</B> for winning was the best',totimestamp(now()),[0.13, 0.8, 0.35, 0.17, 0.03]);
INSERT INTO cycling.comments_vs (record_id, id, commenter, comment, created_at, comment_vector) VALUES (now(),c7fceba0-c141-4207-9494-a29f9809de6f,'Amy','Glad you ran the race in the rain','2017-02-17 12:43:20.234+0400',[0.3, 0.34, 0.2, 0.78, 0.25]);
INSERT INTO cycling.comments_vs (record_id, id, commenter, comment, created_at, comment_vector) VALUES (now(),c7fceba0-c141-4207-9594-a29f9809de6f,'Jane','Boy, was it a drizzle out there!','2017-02-17 12:43:20.234+0400',[0.3, 0.34, 0.2, 0.78, 0.25]);
INSERT INTO cycling.comments_vs (record_id, id, commenter, comment, created_at, comment_vector) VALUES (now(), c7fceba0-c141-3207-9494-a29f9809de6f,'Amy','THE RACE WAS FABULOUS!','2017-02-17 12:43:20.234+0400',[0.3, 0.34, 0.2, 0.78, 0.25]);
INSERT INTO cycling.comments_vs (record_id, id, commenter, comment, created_at, comment_vector) VALUES (now(),c7fceba0-c141-4207-9494-a29f9809de6f, 'Amy','Great snacks at all reststops','2017-03-22 5:16:59.001+0400',[0.1, 0.4, 0.1, 0.52, 0.09]);
INSERT INTO cycling.comments_vs (record_id, id, commenter, comment, created_at, comment_vector) VALUES (now(),c7fceba0-c141-4207-9494-a29f9809de6f,'Amy','Last climb was a killer','2017-04-01 17:43:08.030+0400',[0.3, 0.75, 0.2, 0.2, 0.5]);
INSERT INTO cycling.comments_vs (record_id, id, commenter, comment, created_at, comment_vector) VALUES (now(),e8ae5cf3-d358-4d99-b900-85902fda9bb0,'John','rain, rain,rain, go away!','2017-04-01 06:33:02.16-0800',[0.9, 0.54, 0.12, 0.1, 0.95]);
INSERT INTO cycling.comments_vs (record_id, id, commenter, comment, created_at, comment_vector) VALUES (now(),e8ae5df3-d358-4d99-b900-85902fda9bb0,'Jane','Rain like a monsoon','2017-04-01 06:33:02.16-0800',[0.9, 0.54, 0.12, 0.1, 0.95]);
CREATE CUSTOM INDEX comment_all_ann_options_idx
ON cycling.comments_vs (comment_vector)
WITH OPTIONS = { 'similarity_function': 'COSINE', 'source_model': 'bert'};
CREATE CUSTOM INDEX comment_all_ann_options_idx
ON cycling.comments_vs (comment_vector) USING 'sai'
WITH OPTIONS = { 'similarity_function': 'COSINE', 'source_model': 'bert'};
CREATE CUSTOM INDEX comment_all_ann_options_idx
ON cycling.comments_vs (comment_vector) USING 'StorageAttachedIndex'
WITH OPTIONS = { 'similarity_function': 'COSINE', 'source_model': 'bert'};
CREATE CUSTOM INDEX comment_keyword_htmlstrip_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{
"tokenizer" : {"name" : "keyword"},
"charFilters" : [{"name" : "htmlstrip"}]
}'};
CREATE CUSTOM INDEX comment_keyword_htmlstrip_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{
"tokenizer" : {"name" : "keyword"},
"charFilters" : [{"name" : "htmlstrip"}]
}'};
CREATE CUSTOM INDEX comment_keyword_htmlstrip_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{
"tokenizer" : {"name" : "keyword"},
"charFilters" : [{"name" : "htmlstrip"}]
}'};
CREATE CUSTOM INDEX comment_language_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer" : {"name" : "standard"},
"filters" : [{"name" : "lowercase"}, {"name" : "czechstem"}]
}'};
CREATE CUSTOM INDEX comment_language_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer" : {"name" : "standard"},
"filters" : [{"name" : "lowercase"}, {"name" : "czechstem"}]
}'};
CREATE CUSTOM INDEX comment_language_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer" : {"name" : "standard"},
"filters" : [{"name" : "lowercase"}, {"name" : "czechstem"}]
}'};
CREATE CUSTOM INDEX comment_standard_lowercase_idx ON cycling.comments_vs (comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer':
'{
"tokenizer" : {
"name" : "standard",
"args" : {}
},
"filters" : [
{
"name" : "lowercase",
"args": {}
}
],
"charFilters" : []
}'
};
CREATE CUSTOM INDEX comment_standard_lowercase_idx ON cycling.comments_vs (comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer':
'{
"tokenizer" : {
"name" : "standard",
"args" : {}
},
"filters" : [
{
"name" : "lowercase",
"args": {}
}
],
"charFilters" : []
}'
};
CREATE CUSTOM INDEX comment_standard_lowercase_idx ON cycling.comments_vs (comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer':
'{
"tokenizer" : {
"name" : "standard",
"args" : {}
},
"filters" : [
{
"name" : "lowercase",
"args": {}
}
],
"charFilters" : []
}'
};
CREATE CUSTOM INDEX comment_mapping_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{"tokenizer" : {"name" : "mapping"},
"filters" : [{"name" : "lowercase"}],
"char_filter": {"my_mappings_char_filter": {
"type": "mapping",
"mappings": [
":) => _happy_",
":( => _sad_"
]
}
}'};
CREATE CUSTOM INDEX comment_mapping_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{"tokenizer" : {"name" : "mapping"},
"filters" : [{"name" : "lowercase"}],
"char_filter": {"my_mappings_char_filter": {
"type": "mapping",
"mappings": [
":) => _happy_",
":( => _sad_"
]
}
}'};
CREATE CUSTOM INDEX comment_mapping_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{"tokenizer" : {"name" : "mapping"},
"filters" : [{"name" : "lowercase"}],
"char_filter": {"my_mappings_char_filter": {
"type": "mapping",
"mappings": [
":) => _happy_",
":( => _sad_"
]
}
}'};
CREATE CUSTOM INDEX comment_ngram_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer" : {"name" : "ngram", "args" : {"minGramSize":"2", "maxGramSize":"3"}},
"filters" : [{"name" : "lowercase"}]
}'};
CREATE CUSTOM INDEX comment_ngram_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer" : {"name" : "ngram", "args" : {"minGramSize":"2", "maxGramSize":"3"}},
"filters" : [{"name" : "lowercase"}]
}'};
CREATE CUSTOM INDEX comment_ngram_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer" : {"name" : "ngram", "args" : {"minGramSize":"2", "maxGramSize":"3"}},
"filters" : [{"name" : "lowercase"}]
}'};
CREATE CUSTOM INDEX comment_standard_idx ON cycling.comments_vs (comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {'index_analyzer': 'STANDARD'};
CREATE CUSTOM INDEX comment_standard_idx ON cycling.comments_vs (comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {'index_analyzer': 'STANDARD'};
CREATE CUSTOM INDEX comment_standard_idx ON cycling.comments_vs (comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {'index_analyzer': 'STANDARD'};
CREATE CUSTOM INDEX comment_pattern_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
"tokenizer" : {"name" : "simplepattern", "args" : {"pattern":"[0123456789]{3}"}
}'};
CREATE CUSTOM INDEX comment_pattern_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
"tokenizer" : {"name" : "simplepattern", "args" : {"pattern":"[0123456789]{3}"}
}'};
CREATE CUSTOM INDEX comment_pattern_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
"tokenizer" : {"name" : "simplepattern", "args" : {"pattern":"[0123456789]{3}"}
}'};
CREATE CUSTOM INDEX comment_stemming_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{
"tokenizer" : {"name" : "standard"},
"filters" : [{"name" : "porterstem"}]
}'};
CREATE CUSTOM INDEX comment_stemming_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{
"tokenizer" : {"name" : "standard"},
"filters" : [{"name" : "porterstem"}]
}'};
CREATE CUSTOM INDEX comment_stemming_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{
"tokenizer" : {"name" : "standard"},
"filters" : [{"name" : "porterstem"}]
}'};
CREATE CUSTOM INDEX comment_stemming_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{
"tokenizer" : {"name" : "standard"},
"filters" : [{"name" : "porterstem"}, {"name" : "lowercase"}]
}'};
CREATE CUSTOM INDEX comment_stemming_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{
"tokenizer" : {"name" : "standard"},
"filters" : [{"name" : "porterstem"}, {"name" : "lowercase"}]
}'};
CREATE CUSTOM INDEX comment_stemming_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{
"tokenizer" : {"name" : "standard"},
"filters" : [{"name" : "porterstem"}, {"name" : "lowercase"}]
}'};
CREATE CUSTOM INDEX comment_stop_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
"tokenizer" : {"name" : "stop"},
"filters" : [{"name" : "lowercase"}]
}'};
CREATE CUSTOM INDEX comment_stop_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
"tokenizer" : {"name" : "stop"},
"filters" : [{"name" : "lowercase"}]
}'};
CREATE CUSTOM INDEX comment_stop_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
"tokenizer" : {"name" : "stop"},
"filters" : [{"name" : "lowercase"}]
}'};
CREATE CUSTOM INDEX commenter_synonym_keyword_idx ON cycling.comments_vs(commenter)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{
"tokenizer": {"name" : "keyword"},
"filters" : [
{"name" : "synonym", "args" : {"synonyms" : "Alex, alex, Alexander, alexander => Alex"}}]
}'};
CREATE CUSTOM INDEX commenter_synonym_keyword_idx ON cycling.comments_vs(commenter)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{
"tokenizer": {"name" : "keyword"},
"filters" : [
{"name" : "synonym", "args" : {"synonyms" : "Alex, alex, Alexander, alexander => Alex"}}]
}'};
CREATE CUSTOM INDEX commenter_synonym_keyword_idx ON cycling.comments_vs(commenter)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{
"tokenizer": {"name" : "keyword"},
"filters" : [
{"name" : "synonym", "args" : {"synonyms" : "Alex, alex, Alexander, alexander => Alex"}}]
}'};
CREATE CUSTOM INDEX comment_synonym_lowercase_idx ON cycling.comments_vs (comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{
"tokenizer": {"name" : "whitespace"},
"filters" : [ {"name" : "lowercase"},
{"name" : "synonym", "args" : {"synonyms" : "rain, drizzle => rain"}}]
}'};
CREATE CUSTOM INDEX comment_synonym_lowercase_idx ON cycling.comments_vs (comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{
"tokenizer": {"name" : "whitespace"},
"filters" : [ {"name" : "lowercase"},
{"name" : "synonym", "args" : {"synonyms" : "rain, drizzle => rain"}}]
}'};
CREATE CUSTOM INDEX comment_synonym_lowercase_idx ON cycling.comments_vs (comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{
"tokenizer": {"name" : "whitespace"},
"filters" : [ {"name" : "lowercase"},
{"name" : "synonym", "args" : {"synonyms" : "rain, drizzle => rain"}}]
}'};
CREATE CUSTOM INDEX comment_whitespace_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {'index_analyzer':'whitespace'};
CREATE CUSTOM INDEX comment_whitespace_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {'index_analyzer':'whitespace'};
CREATE CUSTOM INDEX comment_whitespace_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {'index_analyzer':'whitespace'};
CREATE CUSTOM INDEX comment_whitespace_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer":{"name" : "whitespace"}}
}'};
CREATE CUSTOM INDEX comment_whitespace_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer":{"name" : "whitespace"}}
}'};
CREATE CUSTOM INDEX comment_whitespace_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer":{"name" : "whitespace"}}
}'};
CREATE CUSTOM INDEX comment_whitespace_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer":{"name" : "whitespace"},
"filters":[{"name" : "lowercase"}]
}'};
CREATE CUSTOM INDEX comment_whitespace_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer":{"name" : "whitespace"},
"filters":[{"name" : "lowercase"}]
}'};
CREATE CUSTOM INDEX comment_whitespace_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer":{"name" : "whitespace"},
"filters":[{"name" : "lowercase"}]
}'};
CREATE CUSTOM INDEX comment_whitespace_stemming_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer":{"name" : "whitespace"},
"filters":[{"name" : "porterstem"}]
}'};
CREATE CUSTOM INDEX comment_whitespace_stemming_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer":{"name" : "whitespace"},
"filters":[{"name" : "porterstem"}]
}'};
CREATE CUSTOM INDEX comment_whitespace_stemming_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer":{"name" : "whitespace"},
"filters":[{"name" : "porterstem"}]
}'};
CREATE CUSTOM INDEX comment_case_insensitive_idx ON cycling.comments_vs (comment)
WITH OPTIONS = { 'case_sensitive': false};
CREATE CUSTOM INDEX comment_case_insensitive_idx ON cycling.comments_vs (comment)
USING 'sai'
WITH OPTIONS = { 'case_sensitive': false};
CREATE CUSTOM INDEX comment_case_insensitive_idx ON cycling.comments_vs (comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = { 'case_sensitive': false};
CREATE INDEX comment_ann_idx ON cycling.comments_vs(comment_vector);
CREATE INDEX comment_ann_idx ON cycling.comments_vs(comment_vector) USING 'sai';
CREATE CUSTOM INDEX comment_ann_idx ON cycling.comments_vs(comment_vector)
USING 'StorageAttachedIndex';
CREATE INDEX commenter_idx ON cycling.comments_vs (commenter)
WITH OPTIONS = {'case_sensitive': 'true', 'normalize': 'true', 'ascii': 'true'};
CREATE INDEX commenter_idx ON cycling.comments_vs (commenter) USING 'sai'
WITH OPTIONS = {'case_sensitive': 'true', 'normalize': 'true', 'ascii': 'true'};
CREATE CUSTOM INDEX commenter_idx ON cycling.comments_vs (commenter)
USING 'StorageAttachedIndex'
WITH OPTIONS = {'case_sensitive': 'true', 'normalize': 'true', 'ascii': 'true'};
CREATE INDEX commenter_idx ON cycling.comments_vs (commenter);
CREATE INDEX commenter_idx ON cycling.comments_vs (commenter)
USING 'sai';
CREATE CUSTOM INDEX commenter_idx ON cycling.comments_vs (commenter)
USING 'StorageAttachedIndex';
CREATE INDEX created_at_idx ON cycling.comments_vs (created_at);
CREATE INDEX created_at_idx ON cycling.comments_vs (created_at)
USING 'sai';
CREATE CUSTOM INDEX created_at_idx ON cycling.comments_vs (created_at)
USING 'StorageAttachedIndex';
CREATE CUSTOM INDEX comment_sim_function_idx
ON cycling.comments_vs (comment_vector)
WITH OPTIONS = { 'similarity_function': 'DOT_PRODUCT'};
CREATE CUSTOM INDEX comment_sim_function_idx
ON cycling.comments_vs (comment_vector) USING 'sai'
WITH OPTIONS = { 'similarity_function': 'DOT_PRODUCT'};
CREATE CUSTOM INDEX comment_sim_function_idx
ON cycling.comments_vs (comment_vector) USING 'StorageAttachedIndex'
WITH OPTIONS = { 'similarity_function': 'DOT_PRODUCT'};
CREATE CUSTOM INDEX comment_source_model_idx
ON cycling.comments_vs (comment_vector)
WITH OPTIONS = { 'source_model': 'bert'};
CREATE CUSTOM INDEX comment_source_model_idx
ON cycling.comments_vs (comment_vector) USING 'sai'
WITH OPTIONS = { 'source_model': 'bert'};
CREATE CUSTOM INDEX comment_source_model_idx
ON cycling.comments_vs (comment_vector) USING 'StorageAttachedIndex'
WITH OPTIONS = { 'source_model': 'bert'};
DESCRIBE INDEX cycling.comment_all_ann_options_idx;
DESCRIBE INDEX cycling.comment_all_ann_options_idx;
DESCRIBE INDEX cycling.comment_all_ann_options_idx;
DESCRIBE INDEX cycling.comment_keyword_htmlstrip_idx;
DESCRIBE INDEX cycling.comment_keyword_htmlstrip_idx;
DESCRIBE INDEX cycling.comment_keyword_htmlstrip_idx;
DESCRIBE INDEX cycling.comment_language_lowercase_idx;
DESCRIBE INDEX cycling.comment_language_lowercase_idx;
DESCRIBE INDEX cycling.comment_language_lowercase_idx;
DESCRIBE INDEX cycling.comment_standard_lowercase_idx;
DESCRIBE INDEX cycling.comment_standard_lowercase_idx;
DESCRIBE INDEX cycling.comment_standard_lowercase_idx;
DESCRIBE INDEX cycling.comment_mapping_lowercase_idx;
DESCRIBE INDEX cycling.comment_mapping_lowercase_idx;
DESCRIBE INDEX cycling.comment_mapping_lowercase_idx;
DESCRIBE INDEX cycling.comment_ngram_lowercase_idx;
DESCRIBE INDEX cycling.comment_ngram_lowercase_idx;
DESCRIBE INDEX cycling.comment_ngram_lowercase_idx;
DESCRIBE INDEX cycling.comment_pattern_idx;
DESCRIBE INDEX cycling.comment_pattern_idx;
DESCRIBE INDEX cycling.comment_pattern_idx;
DESCRIBE INDEX cycling.comment_stemming_idx;
DESCRIBE INDEX cycling.comment_stemming_idx;
DESCRIBE INDEX cycling.comment_stemming_idx;
DESCRIBE INDEX cycling.comment_stemming_lowercase_idx;
DESCRIBE INDEX cycling.comment_stemming_lowercase_idx;
DESCRIBE INDEX cycling.comment_stemming_lowercase_idx;
DESCRIBE INDEX cycling.comment_stop_lowercase_idx;
DESCRIBE INDEX cycling.comment_stop_lowercase_idx;
DESCRIBE INDEX cycling.comment_stop_lowercase_idx;
DESCRIBE INDEX cycling.commenter_synonym_keyword_idx;
DESCRIBE INDEX cycling.commenter_synonym_keyword_idx;
DESCRIBE INDEX cycling.commenter_synonym_keyword_idx;
DESCRIBE INDEX cycling.comment_synonym_lowercase_idx;
DESCRIBE INDEX cycling.comment_synonym_lowercase_idx;
DESCRIBE INDEX cycling.comment_synonym_lowercase_idx;
DESCRIBE INDEX cycling.comment_whitespace_idx;
DESCRIBE INDEX cycling.comment_whitespace_idx;
DESCRIBE INDEX cycling.comment_whitespace_idx;
DESCRIBE INDEX cycling.comment_whitespace_idx;
DESCRIBE INDEX cycling.comment_whitespace_idx;
DESCRIBE INDEX cycling.comment_whitespace_idx;
// end::index-describe-analyzer-whitespace-idx
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_whitespace_idx v3"
fi
# Query vector search analyzer whitespace
# LLP: Do i have an example?
# DROP INDEX TO RECREATE
$cqlsh -e "DROP INDEX cycling.comment_whitespace_idx;"
# tokenizing filter with whitecase alternate
if [ $index_version = "v1"]; then
tag="index-create-analyzer-whitespace-alternate-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-whitespace-alternate-idx-v1[]
CREATE CUSTOM INDEX comment_whitespace_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {'index_analyzer':'whitespace'};
// end::index-create-analyzer-whitespace-alternate-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_whitespace_idx v1"
tag="index-describe-analyzer-whitespace-alternate-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-whitespace-alternate-idx-v1[]
DESCRIBE INDEX cycling.comment_whitespace_idx;
// end::index-describe-analyzer-whitespace-alternate-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_whitespace_idx v1"
elif [ $index_version = "v2" ]; then
tag="index-create-analyzer-whitespace-alternate-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-whitespace-alternate-idx-v2[]
CREATE CUSTOM INDEX comment_whitespace_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {'index_analyzer':'whitespace'};
// end::index-create-analyzer-whitespace-alternate-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_whitespace_idx v2"
tag="index-describe-analyzer-whitespace-alternate-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-whitespace-alternate-idx-v2[]
DESCRIBE INDEX cycling.comment_whitespace_idx;
// end::index-describe-analyzer-whitespace-alternate-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_whitespace_idx v2"
elif [ $index_version = "v3" ]; then
tag="index-create-analyzer-whitespace-alternate-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-whitespace-alternate-idx-v3[]
CREATE CUSTOM INDEX comment_whitespace_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {'index_analyzer':'whitespace'};
// end::index-create-analyzer-whitespace-alternate-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_whitespace_idx v3"
tag="index-describe-analyzer-whitespace-alternate-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-whitespace-alternate-idx-v3[]
DESCRIBE INDEX cycling.comment_whitespace_idx;
// end::index-describe-analyzer-whitespace-alternate-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_whitespace_idx v3"
fi
# Query vector search analyzer whitespace alternate
# LLP: Do i have an example? Probably same as last one
# DROP INDEX TO RECREATE
$cqlsh -e "DROP INDEX cycling.comment_whitespace_idx;"
# tokenizing filter with whitespace and lowercase filter
# Text: The Dog Tokens: the, dog
if [ $index_version = "v1"]; then
tag="index-create-analyzer-whitespace-lowercase-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-whitespace-lowercase-idx-v1[]
CREATE CUSTOM INDEX comment_whitespace_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer":{"name" : "whitespace"},
"filters":[{"name" : "lowercase"}]
}'};
// end::index-create-analyzer-whitespace-lowercase-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_whitespace_lowercase_idx v1"
tag="index-describe-analyzer-whitespace-lowercase-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-whitespace-lowercase-idx-v1[]
DESCRIBE INDEX cycling.comment_whitespace_lowercase_idx;
// end::index-describe-analyzer-whitespace-lowercase-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_whitespace_lowercase_idx v1"
elif [ $index_version = "v2" ]; then
tag="index-create-analyzer-whitespace-lowercase-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-whitespace-lowercase-idx-v2[]
CREATE CUSTOM INDEX comment_whitespace_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer":{"name" : "whitespace"},
"filters":[{"name" : "lowercase"}]
}'};
// end::index-create-analyzer-whitespace-lowercase-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_whitespace_lowercase_idx v2"
tag="index-describe-analyzer-whitespace-lowercase-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-whitespace-lowercase-idx-v2[]
DESCRIBE INDEX cycling.comment_whitespace_lowercase_idx;
// end::index-describe-analyzer-whitespace-lowercase-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_whitespace_lowercase_idx v2"
elif [ $index_version = "v3" ]; then
tag="index-create-analyzer-whitespace-lowercase-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-whitespace-lowercase-idx-v3[]
CREATE CUSTOM INDEX comment_whitespace_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer":{"name" : "whitespace"},
"filters":[{"name" : "lowercase"}]
}'};
// end::index-create-analyzer-whitespace-lowercase-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_whitespace_lowercase_idx v3"
tag="index-describe-analyzer-whitespace-lowercase-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-whitespace-lowercase-idx-v3[]
DESCRIBE INDEX cycling.comment_whitespace_lowercase_idx;
// end::index-describe-analyzer-whitespace-lowercase-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_whitespace_lowercase_idx v3"
fi
# Query vector search analyzer whitespace lowercase
# Text: The dogs Tokens: the, dog, dogs
# Hmm - no lowercasing, so ^^ may not be correct?
if [ $index_version = "v1"]; then
tag="index-create-analyzer-whitespace-stemming-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-whitespace-stemming-idx-v1[]
CREATE CUSTOM INDEX comment_whitespace_stemming_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer":{"name" : "whitespace"},
"filters":[{"name" : "porterstem"}]
}'};
// end::index-create-analyzer-whitespace-stemming-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_whitespace_stemming_idx v1"
tag="index-describe-analyzer-whitespace-stemming-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-whitespace-stemming-idx-v1[]
DESCRIBE INDEX cycling.comment_whitespace_stemming_idx;
// end::index-describe-analyzer-whitespace-stemming-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_whitespace_stemming_idx v1"
elif [ $index_version = "v2" ]; then
tag="index-create-analyzer-whitespace-stemming-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-whitespace-stemming-idx-v2[]
CREATE CUSTOM INDEX comment_whitespace_stemming_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer":{"name" : "whitespace"},
"filters":[{"name" : "porterstem"}]
}'};
// end::index-create-analyzer-whitespace-stemming-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_whitespace_stemming_idx v2"
tag="index-describe-analyzer-whitespace-stemming-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-whitespace-stemming-idx-v2[]
DESCRIBE INDEX cycling.comment_whitespace_stemming_idx;
// end::index-describe-analyzer-whitespace-stemming-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_whitespace_stemming_idx v2"
elif [ $index_version = "v3" ]; then
tag="index-create-analyzer-whitespace-stemming-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-whitespace-stemming-idx-v3[]
CREATE CUSTOM INDEX comment_whitespace_stemming_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer":{"name" : "whitespace"},
"filters":[{"name" : "porterstem"}]
}'};
// end::index-create-analyzer-whitespace-stemming-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_whitespace_stemming_idx v3"
tag="index-describe-analyzer-whitespace-stemming-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-whitespace-stemming-idx-v3[]
DESCRIBE INDEX cycling.comment_whitespace_stemming_idx;
// end::index-describe-analyzer-whitespace-stemming-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_whitespace_stemming_idx v3"
fi
# Query vector search analyzer whitespace stemming
# DROP INDEX TO RECREATE
$cqlsh -e "DROP INDEX cycling.comment_whitespace_stemming_idx;"
# Text: DoG Tokens: do, dog, og
# Text: RACE, race, RAIN, rain Tokens: ??
if [ $index_version = "v1"]; then
tag="index-create-analyzer-ngram-lowercase-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-ngram-lowercase-idx-v1[]
CREATE CUSTOM INDEX comment_ngram_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer" : {"name" : "ngram", "args" : {"minGramSize":"2", "maxGramSize":"3"}},
"filters" : [{"name" : "lowercase"}]
}'};
// end::index-create-analyzer-ngram-lowercase-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_ngram_lowercase_idx v1"
tag="index-describe-analyzer-ngram-lowercase-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-ngram-lowercase-idx-v1[]
DESCRIBE INDEX cycling.comment_ngram_lowercase_idx;
// end::index-describe-analyzer-ngram-lowercase-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_ngram_lowercase_idx v1"
elif [ $index_version = "v2"]; then
tag="index-create-analyzer-ngram-lowercase-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-ngram-lowercase-idx-v2[]
CREATE CUSTOM INDEX comment_ngram_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer" : {"name" : "ngram", "args" : {"minGramSize":"2", "maxGramSize":"3"}},
"filters" : [{"name" : "lowercase"}]
}'};
// end::index-create-analyzer-ngram-lowercase-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_ngram_lowercase_idx v2"
tag="index-describe-analyzer-ngram-lowercase-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-ngram-lowercase-idx-v2[]
DESCRIBE INDEX cycling.comment_ngram_lowercase_idx;
// end::index-describe-analyzer-ngram-lowercase-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_ngram_lowercase_idx v2"
elif [ $index_version = "v3"]; then
tag="index-create-analyzer-ngram-lowercase-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-ngram-lowercase-idx-v3[]
CREATE CUSTOM INDEX comment_ngram_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer" : {"name" : "ngram", "args" : {"minGramSize":"2", "maxGramSize":"3"}},
"filters" : [{"name" : "lowercase"}]
}'};
// end::index-create-analyzer-ngram-lowercase-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_ngram_lowercase_idx v3"
tag="index-describe-analyzer-ngram-lowercase-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-ngram-lowercase-idx-v3[]
DESCRIBE INDEX cycling.comment_ngram_lowercase_idx;
// end::index-describe-analyzer-ngram-lowercase-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_ngram_lowercase_idx v3"
fi
# Query vector search analyzer ngram lowercase
tag="select-from-comments-vs-analyzer-ngram-lowercase[]"
echo "// tag::$tag" >> $results_table
$cqlsh -e "
// tag::select-from-comments-vs-analyzer-ngram-lowercase[]
SELECT comment,comment_vector,commenter FROM cycling.comments_vs
WHERE comment : 'ra';
// end::select-from-comments-vs-analyzer-ngram-lowercase[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Query vector search analyzer ngram lowercase"
# DROP INDEX TO RECREATE
$cqlsh -e "DROP INDEX cycling.comment_ngram_lowercase_idx;"
# Standard analyzer with pattern filter
# Text: fd-786-335-514-x Tokens: 786, 335, 514
if [ $index_version = "v1"]; then
tag="index-create-analyzer-standard-pattern-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-standard-pattern-idx-v1[]
CREATE CUSTOM INDEX comment_pattern_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
"tokenizer" : {"name" : "simplepattern", "args" : {"pattern":"[0123456789]{3}"}
}'};
// end::index-create-analyzer-standard-pattern-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_pattern_idx v1"
tag="index-describe-analyzer-standard-pattern-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-standard-pattern-idx-v1[]
DESCRIBE INDEX cycling.comment_pattern_idx;
// end::index-describe-analyzer-standard-pattern-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_pattern_idx v1"
elif [ $index_version = "v2"]; then
tag="index-create-analyzer-standard-pattern-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-standard-pattern-idx-v2[]
CREATE CUSTOM INDEX comment_pattern_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
"tokenizer" : {"name" : "simplepattern", "args" : {"pattern":"[0123456789]{3}"}
}'};
// end::index-create-analyzer-standard-pattern-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_pattern_idx v2"
tag="index-describe-analyzer-standard-pattern-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-standard-pattern-idx-v2[]
DESCRIBE INDEX cycling.comment_pattern_idx;
// end::index-describe-analyzer-standard-pattern-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_pattern_idx v2"
elif [ $index_version = "v3"]; then
tag="index-create-analyzer-standard-pattern-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-standard-pattern-idx-v3[]
CREATE CUSTOM INDEX comment_pattern_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
"tokenizer" : {"name" : "simplepattern", "args" : {"pattern":"[0123456789]{3}"}
}'};
// end::index-create-analyzer-standard-pattern-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_pattern_idx v3"
tag="index-describe-analyzer-standard-pattern-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-standard-pattern-idx-v3[]
DESCRIBE INDEX cycling.comment_pattern_idx;
// end::index-describe-analyzer-standard-pattern-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_pattern_idx v3"
fi
# Query vector search analyzer standard pattern
# DROP INDEX TO RECREATE
$cqlsh -e "DROP INDEX cycling.comment_pattern_idx;"
# Standard analyzer with keyword tokenizer and htmlstrip charFilter
# Text: Tokens:
if [ $index_version = "v1"]; then
tag ="index-create-analyzer-keyword-htmlstrip-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-keyword-htmlstrip-idx-v1[]
CREATE CUSTOM INDEX comment_keyword_htmlstrip_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{
"tokenizer" : {"name" : "keyword"},
"charFilters" : [{"name" : "htmlstrip"}]
}'};
// end::index-create-analyzer-keyword-htmlstrip-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_keyword_htmlstrip_idx v1"
tag="index-describe-analyzer-keyword-htmlstrip-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-keyword-htmlstrip-idx-v1[]
DESCRIBE INDEX cycling.comment_keyword_htmlstrip_idx;
// end::index-describe-analyzer-keyword-htmlstrip-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_keyword_htmlstrip_idx v1"
elif [ $index_version = "v2"]; then
tag ="index-create-analyzer-keyword-htmlstrip-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-keyword-htmlstrip-idx-v2[]
CREATE CUSTOM INDEX comment_keyword_htmlstrip_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{
"tokenizer" : {"name" : "keyword"},
"charFilters" : [{"name" : "htmlstrip"}]
}'};
// end::index-create-analyzer-keyword-htmlstrip-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_keyword_htmlstrip_idx v2"
tag="index-describe-analyzer-keyword-htmlstrip-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-keyword-htmlstrip-idx-v2[]
DESCRIBE INDEX cycling.comment_keyword_htmlstrip_idx;
// end::index-describe-analyzer-keyword-htmlstrip-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_keyword_htmlstrip_idx v2"
elif [ $index_version = "v3"]; then
tag ="index-create-analyzer-keyword-htmlstrip-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-keyword-htmlstrip-idx-v3[]
CREATE CUSTOM INDEX comment_keyword_htmlstrip_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{
"tokenizer" : {"name" : "keyword"},
"charFilters" : [{"name" : "htmlstrip"}]
}'};
// end::index-create-analyzer-keyword-htmlstrip-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_keyword_htmlstrip_idx v3"
tag="index-describe-analyzer-keyword-htmlstrip-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-keyword-htmlstrip-idx-v3[]
DESCRIBE INDEX cycling.comment_keyword_htmlstrip_idx;
// end::index-describe-analyzer-keyword-htmlstrip-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_keyword_htmlstrip_idx v3"
fi
# Query vector search analyzer keyword htmlstrip
# Query vector search analyzer htmlstrip
tag="select-from-comments-vs-analyzer-htmlstrip[]"
echo "// tag::$tag" >> $results_table
$cqlsh -e "
// tag::select-from-comments-vs-analyzer-htmlstrip[]
SELECT comment,comment_vector,commenter FROM cycling.comments_vs
WHERE comment : 'The gift certificate for winning was the best';
// end::select-from-comments-vs-analyzer-htmlstrip[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Query vector search analyzer htmlstrip"
# LLP: htmlstrip
# cqlsh:cycling> select comment,commenter from comments_vs where comment : 'The gift certificate for winning was the best';
# comment | commenter
#------------------------------------------------------+-----------
# The gift certificate for winning was the best | Amy
# The <B>gift certificate</B> for winning was the best | Amy
#
#(2 rows)
# DROP INDEX TO RECREATE
$cqlsh -e "DROP INDEX cycling.comment_keyword_htmlstrip_idx;"
# Standard analyzer with language and lowercase filters
# Text: panove Tokens: pan (with accents)
if [ $index_version = "v1"]; then
tag="index-create-analyzer-language-lowercase-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-language-lowercase-idx-v1[]
CREATE CUSTOM INDEX comment_language_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer" : {"name" : "standard"},
"filters" : [{"name" : "lowercase"}, {"name" : "czechstem"}]
}'};
// end::index-create-analyzer-language-lowercase-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_language_lowercase_idx v1"
tag="index-describe-analyzer-language-lowercase-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-language-lowercase-idx-v1[]
DESCRIBE INDEX cycling.comment_language_lowercase_idx;
// end::index-describe-analyzer-language-lowercase-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_language_lowercase_idx v1"
elif [ $index_version = "v2"]; then
tag="index-create-analyzer-language-lowercase-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-language-lowercase-idx-v2[]
CREATE CUSTOM INDEX comment_language_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer" : {"name" : "standard"},
"filters" : [{"name" : "lowercase"}, {"name" : "czechstem"}]
}'};
// end::index-create-analyzer-language-lowercase-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_language_lowercase_idx v2"
tag="index-describe-analyzer-language-lowercase-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-language-lowercase-idx-v2[]
DESCRIBE INDEX cycling.comment_language_lowercase_idx;
// end::index-describe-analyzer-language-lowercase-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_language_lowercase_idx v2"
elif [ $index_version = "v3"]; then
tag="index-create-analyzer-language-lowercase-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-language-lowercase-idx-v3[]
CREATE CUSTOM INDEX comment_language_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
{"tokenizer" : {"name" : "standard"},
"filters" : [{"name" : "lowercase"}, {"name" : "czechstem"}]
}'};
// end::index-create-analyzer-language-lowercase-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_language_lowercase_idx v3"
tag="index-describe-analyzer-language-lowercase-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-language-lowercase-idx-v3[]
DESCRIBE INDEX cycling.comment_language_lowercase_idx;
// end::index-describe-analyzer-language-lowercase-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_language_lowercase_idx v3"
fi
# Query vector search analyzer language lowercase
# DROP INDEX TO RECREATE
$cqlsh -e "DROP INDEX cycling.comment_language_lowercase_idx;"
# Standard analyzer with stop and lowercase filters
# Text: The Dog And the cow Tokens: dog, cow
if [ $index_version = "v1"]; then
tag="index-create-analyzer-stop-lowercase-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-stop-lowercase-idx-v1[]
CREATE CUSTOM INDEX comment_stop_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
"tokenizer" : {"name" : "stop"},
"filters" : [{"name" : "lowercase"}]
}'};
// end::index-create-analyzer-stop-lowercase-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_stop_lowercase_idx v1"
tag="index-describe-analyzer-stop-lowercase-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-stop-lowercase-idx-v1[]
DESCRIBE INDEX cycling.comment_stop_lowercase_idx;
// end::index-describe-analyzer-stop-lowercase-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_stop_lowercase_idx v1"
elif [ $index_version = "v2"]; then
tag="index-create-analyzer-stop-lowercase-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-stop-lowercase-idx-v2[]
CREATE CUSTOM INDEX comment_stop_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
"tokenizer" : {"name" : "stop"},
"filters" : [{"name" : "lowercase"}]
}'};
// end::index-create-analyzer-stop-lowercase-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_stop_lowercase_idx v2"
tag="index-describe-analyzer-stop-lowercase-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-stop-lowercase-idx-v2[]
DESCRIBE INDEX cycling.comment_stop_lowercase_idx;
// end::index-describe-analyzer-stop-lowercase-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_stop_lowercase_idx v2"
elif [ $index_version = "v3"]; then
tag="index-create-analyzer-stop-lowercase-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-stop-lowercase-idx-v3[]
CREATE CUSTOM INDEX comment_stop_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '
"tokenizer" : {"name" : "stop"},
"filters" : [{"name" : "lowercase"}]
}'};
// end::index-create-analyzer-stop-lowercase-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_stop_lowercase_idx v3"
tag="index-describe-analyzer-stop-lowercase-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-stop-lowercase-idx-v3[]
DESCRIBE INDEX cycling.comment_stop_lowercase_idx;
// end::index-describe-analyzer-stop-lowercase-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_stop_lowercase_idx v3"
fi
# Query vector search analyzer stop lowercase
# DROP INDEX TO RECREATE
$cqlsh -e "DROP INDEX cycling.comment_stop_lowercase_idx;"
# Standard analyzer with synonym and lowercase filters
# Text: rain, drizzle, Rain Tokens: rain, drizzle
if [ $index_version = "v1"]; then
tag="index-create-analyzer-synonym-lowercase-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-synonym-lowercase-idx-v1[]
CREATE CUSTOM INDEX comment_synonym_lowercase_idx ON cycling.comments_vs (comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{
"tokenizer": {"name" : "whitespace"},
"filters" : [ {"name" : "lowercase"},
{"name" : "synonym", "args" : {"synonyms" : "rain, drizzle => rain"}}]
}'};
// end::index-create-analyzer-synonym-lowercase-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_synonym_lowercase_idx v1"
tag="index-describe-analyzer-synonym-lowercase-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-synonym-lowercase-idx-v1[]
DESCRIBE INDEX cycling.comment_synonym_lowercase_idx;
// end::index-describe-analyzer-synonym-lowercase-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_synonym_lowercase_idx v1"
elif [ $index_version = "v2"]; then
tag="index-create-analyzer-synonym-lowercase-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-synonym-lowercase-idx-v2[]
CREATE CUSTOM INDEX comment_synonym_lowercase_idx ON cycling.comments_vs (comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{
"tokenizer": {"name" : "whitespace"},
"filters" : [ {"name" : "lowercase"},
{"name" : "synonym", "args" : {"synonyms" : "rain, drizzle => rain"}}]
}'};
// end::index-create-analyzer-synonym-lowercase-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_synonym_lowercase_idx v2"
tag="index-describe-analyzer-synonym-lowercase-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-synonym-lowercase-idx-v2[]
DESCRIBE INDEX cycling.comment_synonym_lowercase_idx;
// end::index-describe-analyzer-synonym-lowercase-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_synonym_lowercase_idx v2"
elif [ $index_version = "v3"]; then
tag="index-create-analyzer-synonym-lowercase-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-synonym-lowercase-idx-v3[]
CREATE CUSTOM INDEX comment_synonym_lowercase_idx ON cycling.comments_vs (comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{
"tokenizer": {"name" : "whitespace"},
"filters" : [ {"name" : "lowercase"},
{"name" : "synonym", "args" : {"synonyms" : "rain, drizzle => rain"}}]
}'};
// end::index-create-analyzer-synonym-lowercase-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_synonym_lowercase_idx v3"
tag="index-describe-analyzer-synonym-lowercase-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-synonym-lowercase-idx-v3[]
DESCRIBE INDEX cycling.comment_synonym_lowercase_idx;
// end::index-describe-analyzer-synonym-lowercase-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_synonym_lowercase_idx v3"
fi
# Query vector search analyzer synonym lowercase
# Query vector search analyzer synonym lowercase
tag="select-from-comments-vs-analyzer-synonym-lowercase[]"
echo "// tag::$tag" >> $results_table
$cqlsh -e "
// tag:select-from-comments-vs-analyzer-synonym-lowercase[]
SELECT comment, comment_vector, commenter FROM comments_vs WHERE comment : 'drizzle';
SELECT comment, comment_vector, commenter FROM comments_vs WHERE comment : 'rain';
// end::select-from-comments-vs-analyzer-synonym-lowercase[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Query vector search analyzer synonym lowercase"
# DROP INDEX TO RECREATE
$cqlsh -e "DROP INDEX cycling.comment_synonym_lowercase_idx;"
# Standard analyzer with keyword tokenizer and synonym filter
# Text: Tokens:
if [ $index_version = "v1"]; then
tag="index-create-analyzer-synonym-keyword-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-synonym-keyword-idx-v1[]
CREATE CUSTOM INDEX commenter_synonym_keyword_idx ON cycling.comments_vs(commenter)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{
"tokenizer": {"name" : "keyword"},
"filters" : [
{"name" : "synonym", "args" : {"synonyms" : "Alex, alex, Alexander, alexander => Alex"}}]
}'};
// end::index-create-analyzer-synonym-keyword-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index commenter_synonym_keyword_idx v1"
tag="index-describe-analyzer-synonym-keyword-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-synonym-keyword-idx-v1[]
DESCRIBE INDEX cycling.commenter_synonym_keyword_idx;
// end::index-describe-analyzer-synonym-keyword-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index commenter_synonym_keyword_idx v1"
elif [ $index_version = "v2"]; then
tag="index-create-analyzer-synonym-keyword-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-synonym-keyword-idx-v2[]
CREATE CUSTOM INDEX commenter_synonym_keyword_idx ON cycling.comments_vs(commenter)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{
"tokenizer": {"name" : "keyword"},
"filters" : [
{"name" : "synonym", "args" : {"synonyms" : "Alex, alex, Alexander, alexander => Alex"}}]
}'};
// end::index-create-analyzer-synonym-keyword-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index commenter_synonym_keyword_idx v2"
tag="index-describe-analyzer-synonym-keyword-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-synonym-keyword-idx-v2[]
DESCRIBE INDEX cycling.commenter_synonym_keyword_idx;
// end::index-describe-analyzer-synonym-keyword-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index commenter_synonym_keyword_idx v2"
elif [ $index_version = "v3"]; then
tag="index-create-analyzer-synonym-keyword-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-synonym-keyword-idx-v3[]
CREATE CUSTOM INDEX commenter_synonym_keyword_idx ON cycling.comments_vs(commenter)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{
"tokenizer": {"name" : "keyword"},
"filters" : [
{"name" : "synonym", "args" : {"synonyms" : "Alex, alex, Alexander, alexander => Alex"}}]
}'};
// end::index-create-analyzer-synonym-keyword-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index commenter_synonym_keyword_idx v3"
tag="index-describe-analyzer-synonym-keyword-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-synonym-keyword-idx-v3[]
DESCRIBE INDEX cycling.commenter_synonym_keyword_idx;
// end::index-describe-analyzer-synonym-keyword-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index commenter_synonym_keyword_idx v3"
fi
# Query vector search analyzer synonym keyword
tag="select-from-comments-vs-analyzer-synonym-keyword[]"
echo "// tag::$tag" >> $results_table
$cqlsh -e "
// tag:select-from-comments-vs-analyzer-synonym-keyword[]
SELECT * FROM comments_vs WHERE comment : 'Alex';
SELECT * FROM comments_vs WHERE comment : 'alex';
SELECT * FROM comments_vs WHERE commenter : 'Alexander';
// end::select-from-comments-vs-analyzer-synonym-keyword[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Query vector search analyzer synonym keyword"
# DROP INDEX TO RECREATE
$cqlsh -e "DROP INDEX cycling.commenter_synonym_keyword_idx;"
# Standard analyzer with mapping and lowercase filters
# Text: Tokens:
if [ $index_version = "v1"]; then
tag="index-create-analyzer-mapping-lowercase-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-mapping-lowercase-idx-v1[]
CREATE CUSTOM INDEX comment_mapping_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{"tokenizer" : {"name" : "mapping"},
"filters" : [{"name" : "lowercase"}],
"char_filter": {"my_mappings_char_filter": {
"type": "mapping",
"mappings": [
":) => _happy_",
":( => _sad_"
]
}
}'};
// end::index-create-analyzer-mapping-lowercase-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_mapping_lowercase_idx v1"
tag="index-describe-analyzer-mapping-lowercase-idx-v1[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-mapping-lowercase-idx-v1[]
DESCRIBE INDEX cycling.comment_mapping_lowercase_idx;
// end::index-describe-analyzer-mapping-lowercase-idx-v1[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_mapping_lowercase_idx v1"
elif [ $index_version = "v2"]; then
tag="index-create-analyzer-mapping-lowercase-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-mapping-lowercase-idx-v2[]
CREATE CUSTOM INDEX comment_mapping_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{"tokenizer" : {"name" : "mapping"},
"filters" : [{"name" : "lowercase"}],
"char_filter": {"my_mappings_char_filter": {
"type": "mapping",
"mappings": [
":) => _happy_",
":( => _sad_"
]
}
}'};
// end::index-create-analyzer-mapping-lowercase-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_mapping_lowercase_idx v2"
tag="index-describe-analyzer-mapping-lowercase-idx-v2[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-mapping-lowercase-idx-v2[]
DESCRIBE INDEX cycling.comment_mapping_lowercase_idx;
// end::index-describe-analyzer-mapping-lowercase-idx-v2[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_mapping_lowercase_idx v2"
elif [ $index_version = "v3"]; then
tag="index-create-analyzer-mapping-lowercase-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-create-analyzer-mapping-lowercase-idx-v3[]
CREATE CUSTOM INDEX comment_mapping_lowercase_idx ON cycling.comments_vs(comment)
USING 'StorageAttachedIndex'
WITH OPTIONS = {
'index_analyzer': '{"tokenizer" : {"name" : "mapping"},
"filters" : [{"name" : "lowercase"}],
"char_filter": {"my_mappings_char_filter": {
"type": "mapping",
"mappings": [
":) => _happy_",
":( => _sad_"
]
}
}'};
// end::index-create-analyzer-mapping-lowercase-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Create index comment_mapping_lowercase_idx v3"
tag="index-describe-analyzer-mapping-lowercase-idx-v3[]"
echo -e "\n// tag:$tag" >> $results_table
$cqlsh -e "
// tag::index-describe-analyzer-mapping-lowercase-idx-v3[]
DESCRIBE INDEX cycling.comment_mapping_lowercase_idx;
// end::index-describe-analyzer-mapping-lowercase-idx-v3[]
" >> $results_table
echo "// end::$tag" >> $results_table
echo "Describe index comment_mapping_lowercase_idx v3"
fi
# Query vector search analyzer mapping lowercase
DESCRIBE INDEX cycling.comment_whitespace_lowercase_idx;
DESCRIBE INDEX cycling.comment_whitespace_lowercase_idx;
DESCRIBE INDEX cycling.comment_whitespace_lowercase_idx;
DESCRIBE INDEX cycling.comment_whitespace_stemming_idx;
DESCRIBE INDEX cycling.comment_whitespace_stemming_idx;
DESCRIBE INDEX cycling.comment_whitespace_stemming_idx;
DESCRIBE INDEX cycling.comment_ann_idx;
DESCRIBE INDEX cycling.comment_ann_idx;
DESCRIBE INDEX cycling.comment_ann_idx;
DESCRIBE INDEX cycling.commenter_idx;
DESCRIBE INDEX cycling.commenter_idx;
DESCRIBE INDEX cycling.commenter_idx;
DESCRIBE INDEX cycling.commenter_idx;
DESCRIBE INDEX cycling.commenter_idx;
DESCRIBE INDEX cycling.commenter_idx;
DESCRIBE INDEX cycling.created_at_idx;
DESCRIBE INDEX cycling.created_at_idx;
DESCRIBE INDEX cycling.created_at_idx;
DESCRIBE INDEX cycling.comment_sim_function_idx;
DESCRIBE INDEX cycling.comment_sim_function_idx;
DESCRIBE INDEX cycling.comment_sim_function_idx;
DESCRIBE INDEX cycling.comment_source_model_idx;
DESCRIBE INDEX cycling.comment_source_model_idx;
DESCRIBE INDEX cycling.comment_source_model_idx;
DROP INDEX IF EXISTS cycling.comment_ann_idx;
DROP INDEX IF EXISTS cycling.comment_sim_function_idx;
DROP INDEX IF EXISTS cycling.comment_source_model_idx;
DROP INDEX IF EXISTS cycling.commenter_idx;
DROP INDEX IF EXISTS cycling.created_at_idx;
SELECT comment,comment_vector,commenter FROM cycling.comments_vs;
SELECT comment,comment_vector,commenter FROM cycling.comments_vs
WHERE commenter = 'alex';
SELECT comment,comment_vector,commenter FROM cycling.comments_vs
WHERE commenter = 'Alex';
SELECT * FROM cycling.comments_vs
ORDER BY comment_vector ANN OF [0.15, 0.1, 0.1, 0.35, 0.55]
LIMIT 3;
SELECT comment,comment_vector,commenter FROM cycling.comments_vs
WHERE comment : 'The gift certificate for winning was the best';
SELECT comment,comment_vector,commenter FROM cycling.comments_vs
WHERE comment : 'Glad you ran the Race in the Rain';
SELECT comment,comment_vector,commenter FROM cycling.comments_vs
WHERE comment : 'ra';
SELECT comment,comment_vector,commenter FROM cycling.comments_vs
WHERE comment : 'Glad you ran the Race in the Rain';
SELECT comment,comment_vector,commenter FROM cycling.comments_vs
WHERE comment : 'rain';
SELECT comment,comment_vector,commenter FROM cycling.comments_vs
WHERE comment : 'rain' AND comment: 'race';
SELECT comment,comment_vector,commenter FROM cycling.comments_vs
WHERE comment : 'rain' AND comment: 'race';
SELECT comment,comment_vector,commenter FROM cycling.comments_vs
WHERE comment : 'Glad you ran the Race in the Rain';
SELECT comment, similarity_cosine(comment_vector, [0.2, 0.15, 0.3, 0.2, 0.05])
FROM cycling.comments_vs
ORDER BY comment_vector ANN OF [0.1, 0.15, 0.3, 0.12, 0.05]
LIMIT 3;
SELECT * FROM cycling.comments_vs
ORDER BY comment_vector ANN OF [0.15, 0.1, 0.1, 0.35, 0.55]
LIMIT 3;
SELECT * FROM cycling.comments_vs
ORDER BY comment_vector ANN OF [0.15, 0.1, 0.1, 0.35, 0.55]
LIMIT 3;
SELECT * FROM cycling.comments_vs
WHERE created_at='2017-03-21 21:11:09.999000+0000'
AND commenter = 'Alex';
SELECT * FROM cycling.comments_vs
WHERE created_at IN ('2017-03-21 21:11:09.999000+0000','2017-03-22 01:16:59.001000+0000');
SELECT * FROM cycling.comments_vs
WHERE created_at='2017-03-21 21:11:09.999000+0000'
OR created_at='2017-03-22 01:16:59.001000+0000';
SELECT * FROM cycling.comments_vs WHERE commenter = 'Alex';
SELECT id, commenter, toJson(created_at) FROM cycling.comments_vs;
ALTER TABLE cycling.comments_vs
ADD comment_vector VECTOR <FLOAT, 5>; (1)
CREATE TABLE IF NOT EXISTS cycling.comments_vs (
record_id timeuuid,
id uuid,
commenter text,
comment text,
comment_vector VECTOR <FLOAT, 5>,
created_at timestamp,
PRIMARY KEY (id, created_at)
)
WITH CLUSTERING ORDER BY (created_at DESC);
DESCRIBE TABLE cycling.comments_vs;
DROP TABLE IF EXISTS cycling.comments_vs;