table-birthday
INSERT INTO cycling.birthday_list (cyclist_name, blist) VALUES ('Claudio VANDELLI', { 'age':'54', 'bday':'27/07/1961', 'nation':'ITALY' });
INSERT INTO cycling.birthday_list (cyclist_name, blist) VALUES ('Laurence BOURQUE', { 'age':'23', 'bday':'27/07/1992', 'nation':'CANADA' });
INSERT INTO cycling.birthday_list (cyclist_name, blist) VALUES ('Claudio HEINEN', { 'age':'23', 'bday':'27/07/1992', 'nation':'GERMANY' });
INSERT INTO cycling.birthday_list (cyclist_name, blist) VALUES ('Luc HAGENAARS', { 'age':'28', 'bday':'27/07/1987', 'nation':'NETHERLANDS' });
INSERT INTO cycling.birthday_list (cyclist_name, blist) VALUES ('Toine POELS', { 'age':'52', 'bday':'27/07/1963', 'nation':'NETHERLANDS' });
INSERT INTO cycling.birthday_list (cyclist_name, blist) VALUES ('Claudio VANDELLI', { 'age':'54', 'bday':'27/07/1961', 'nation':'ITALY' });
INSERT INTO cycling.birthday_list (cyclist_name, blist) VALUES ('Laurence BOURQUE', { 'age':'23', 'bday':'27/07/1992', 'nation':'CANADA' });
INSERT INTO cycling.birthday_list (cyclist_name, blist) VALUES ('Claudio HEINEN', { 'age':'23', 'bday':'27/07/1992', 'nation':'GERMANY' });
INSERT INTO cycling.birthday_list (cyclist_name, blist) VALUES ('Luc HAGENAARS', { 'age':'28', 'bday':'27/07/1987', 'nation':'NETHERLANDS' });
INSERT INTO cycling.birthday_list (cyclist_name, blist) VALUES ('Toine POELS', { 'age':'52', 'bday':'27/07/1963', 'nation':'NETHERLANDS' });
INSERT INTO cycling.birthday_list (
cyclist_name, blist
) VALUES (
'Allan DAVIS', { 'age':'35', 'bday':'27/07/1980', 'nation':'AUSTRALIA' }
);
INSERT INTO cycling.birthday_list (
cyclist_name, blist
) VALUES (
'Allan DAVIS', { 'age':'35', 'bday':'27/07/1980', 'nation':'AUSTRALIA' }
);
DESC ACTIVE SEARCH INDEX SCHEMA ON cycling.birthday_list;
CREATE SEARCH INDEX IF NOT EXISTS ON cycling.birthday_list;
CREATE INDEX IF NOT EXISTS blist_entries_idx ON cycling.birthday_list ( ENTRIES(blist) );
CREATE CUSTOM INDEX IF NOT EXISTS blist_entries_idx ON cycling.birthday_list ( ENTRIES(blist) )
USING 'StorageAttachedIndex';
CREATE INDEX IF NOT EXISTS blist_keys_idx ON cycling.birthday_list ( KEYS(blist) );
CREATE CUSTOM INDEX IF NOT EXISTS blist_keys_idx ON cycling.birthday_list ( KEYS(blist) )
USING 'StorageAttachedIndex';
CREATE INDEX IF NOT EXISTS blist_values_idx ON cycling.birthday_list ( VALUES(blist) );
CREATE CUSTOM INDEX IF NOT EXISTS blist_values_idx ON cycling.birthday_list ( VALUES(blist) )
USING 'StorageAttachedIndex';
DESCRIBE INDEX cycling.blist_entries_idx;
DESCRIBE INDEX cycling.blist_entries_idx;
DESCRIBE INDEX cycling.blist_keys_idx;
DESCRIBE INDEX cycling.blist_keys_idx;
DESCRIBE INDEX cycling.blist_values_idx;
DESCRIBE INDEX cycling.blist_values_idx;
DROP INDEX IF EXISTS cycling.blist_entries_idx;
DROP INDEX IF EXISTS cycling.blist_keys_idx;
DROP INDEX IF EXISTS cycling.blist_values_idx;
ALTER SEARCH INDEX SCHEMA ON cycling.birthday_list
ADD fields.field[ @indexed='true', @multiValued='false', @name='blist_age', @type='TrieIntField' ];
ALTER SEARCH INDEX SCHEMA ON cycling.birthday_list
ADD types.fieldType[ @class='org.apache.solr.schema.TrieIntField', @name='TrieIntField' ];
ALTER SEARCH INDEX SCHEMA ON cycling.birthday_list
ADD fields.field[ @name='blist_nation', @indexed='true', @multiValued='false', @type='StrField' ];
DESC PENDING SEARCH INDEX SCHEMA ON cycling.birthday_list;
REBUILD SEARCH INDEX ON cycling.birthday_list;
RELOAD SEARCH INDEX ON cycling.birthday_list;
SELECT * FROM cycling.birthday_list WHERE blist[ 'age' ] = '23';
SELECT * FROM cycling.birthday_list WHERE blist[ 'age' ] = '23';
SELECT * FROM cycling.birthday_list;
SELECT * FROM cycling.birthday_list WHERE blist [ 'bday' ] = '27/07/1992'
ALLOW FILTERING;
SELECT * FROM cycling.birthday_list WHERE blist [ 'bday' ] = '27/07/1992'
ALLOW FILTERING;
SELECT JSON * FROM cycling.birthday_list;
SELECT * FROM cycling.birthday_list WHERE blist CONTAINS KEY 'age';
SELECT * FROM cycling.birthday_list WHERE blist CONTAINS KEY 'age';
SELECT * FROM cycling.birthday_list WHERE blist CONTAINS 'NETHERLANDS';
SELECT * FROM cycling.birthday_list WHERE blist CONTAINS 'NETHERLANDS';
SELECT * FROM cycling.birthday_list WHERE blist[ 'nation' ] = 'CANADA' AND blist[ 'age' ] = '23';
SELECT * FROM cycling.birthday_list WHERE blist[ 'nation' ] = 'CANADA'
AND blist[ 'age' ] = '23' ALLOW FILTERING;
SELECT * FROM cycling.birthday_list WHERE blist[ 'nation' ] = 'CANADA' OR blist[ 'age' ] = '28';
SELECT * FROM cycling.birthday_list WHERE blist[ 'nation' ] = 'NETHERLANDS';
SELECT * FROM cycling.birthday_list WHERE blist[ 'nation' ] = 'NETHERLANDS';
ALTER SEARCH INDEX SCHEMA ON cycling.birthday_list
ADD fields.field[ @name='blist_age', @type='text', @indexed='true' ];
CREATE SEARCH INDEX IF NOT EXISTS ON cycling.birthday_list
WITH COLUMNS blist { excluded:true };
REBUILD SEARCH INDEX ON cycling.birthday_list;
CREATE TABLE IF NOT EXISTS cycling.birthday_list (
cyclist_name text PRIMARY KEY,
blist map<text, text>
);
DESCRIBE TABLE cycling.birthday_list;
DROP TABLE IF EXISTS cycling.birthday_list;