clickhouseinverted-index

Unable to enable experimental feature in Clickhouse


I am new to Click-house and have set up a local server. I want to create inverted index but as it is an experimental feature it requires SET allow_experimental_inverted_index = 1. The problem is it doesn't work.

I use SET allow_experimental_inverted_index = 1, then use ALTER TABLE posts ADD INDEX inv_title(title) TYPE inverted(2);which gives Experimental Inverted Index feature is not enabled (turn on setting 'allow_experimental_inverted_index').

I have tried setting up an xml sudo nano /etc/clickhouse-server/users.d/allow_experimental_inverted_index.xml But with no success


Solution

  • When using the clickhouse-client, these is no session - so changing a setting in one request doesn't "stick".

    Try this:

    ALTER TABLE posts
        ADD INDEX inv_title(title) TYPE inverted(2) GRANULARITY 1
    SETTINGS allow_experimental_inverted_index = 1