Hi all,
I searched hard but could not find this information: Is it possible to set a fulltext index on subfields of an object field?
I mean like so: fulltext index on data_obj[‘message’]
CREATE TABLE fulltext_test3 (
ts TIMESTAMP WITHOUT TIME ZONE,
id STRING,
topic STRING,
data_obj OBJECT(DYNAMIC) AS (
message TEXT INDEX using fulltext with (analyzer = 'english')
)
)
Can full text index be added after the table is created on column message in above case? What is the syntax to add it using alter table command? Could someone please help on that?
Adding indexes or generated columns is currently not possible on tables that already hold data. You would need to recreate the table and use INSERT INTO SELECT or COPY TO/FROM
could you maybe share you schema. I am not 100% sure what you are trying to achieve.
It is not possible to remove columns / indexes from an existing table as of now. This is due how CrateDB stores and indexes data with Lucene. Any removal of columns/indexes would lead to a reindex of the table (Lucene segments) or not truly delete the data, but only adjust the schema.