databend icon indicating copy to clipboard operation
databend copied to clipboard

feat(query): create table support add inverted index

Open b41sh opened this issue 9 months ago โ€ข 0 comments

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

create table support add inverted index

mysql> CREATE TABLE t (
    ->   id int,
    ->   content string,
    ->   INVERTED INDEX idx1 (content) tokenizer = 'chinese' filters = 'english_stop,english_stemmer,chinese_stop'
    -> );
Query OK, 0 rows affected (0.11 sec)

mysql> show create table t;
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                                                                            |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| t     | CREATE TABLE t (
  id INT NULL,
  content VARCHAR NULL,
  SYNC INVERTED INDEX idx1 (content) filters = 'english_stop,english_stemmer,chinese_stop', tokenizer = 'chinese'
) ENGINE=FUSE |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.09 sec)
Read 0 rows, 0.00 B in 0.035 sec., 0 rows/sec., 0.00 B/sec.
  • part of #14825

Tests

  • [x] Unit Test
  • [x] Logic Test
  • [ ] Benchmark Test
  • [ ] No Test - Explain why

Type of change

  • [ ] Bug Fix (non-breaking change which fixes an issue)
  • [x] New Feature (non-breaking change which adds functionality)
  • [ ] Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • [ ] Documentation Update
  • [ ] Refactoring
  • [ ] Performance Improvement
  • [ ] Other (please describe):

This change isโ€‚Reviewable

b41sh avatar May 16 '24 09:05 b41sh