Skip to content

Commit

Permalink
Remove code snippet allowing creating full-text index on multiple fie…
Browse files Browse the repository at this point in the history
…lds (#1840)

### What problem does this PR solve?


### Type of change

- [x] Documentation Update
  • Loading branch information
writinwaters authored Sep 10, 2024
1 parent 69d57f5 commit 417e110
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions docs/references/pysdk_api_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ table_object.create_index(

#### Create a full-text index

```python {12}
```python
from infinity.index import IndexInfo, IndexType
# Create a table named "test_index_fulltext" with a varchar column "body"
table_object = db_object.create_table("test_index_fulltext", {"body": {"type": "varchar"}}, None)
Expand All @@ -824,7 +824,7 @@ table_object.create_index(
)
```

```python {13}
```python
from infinity.index import IndexInfo, IndexType
# Create a table named "test_index_fulltext" with a varchar column "body"
table_object = db_object.create_table("test_index_fulltext", {"body": {"type": "varchar"}}, None)
Expand All @@ -843,25 +843,6 @@ table_object.create_index(
)
```

```python {11-13}
from infinity.index import IndexInfo, IndexType
# In the following code snippet, you will see an index built on three columns
# IMPORTANT: For now, multi-column index works with full-text index ONLY.
# Create a table named "test_index_fulltext" with three varchar columns "doctitle", "docdate", and "body"
table_object = db_object.create_table("test_index_fulltext", {"doctitle": {"type": "varchar"}, "docdate": {"type": "varchar"}, "body": {"type": "varchar"}}, None)
# Create a full-text index named "my_index" on three columns "doctitle", "docdate", and "body" with default parameter settings:
# - "ANALYZER": "standard"
table_object.create_index(
"my_index",
[
IndexInfo("doctitle", IndexType.FullText),
IndexInfo("docdate", IndexType.FullText),
IndexInfo("body", IndexType.FullText),
],
None
)
```

#### Create a secondary index

```python {11}
Expand Down

0 comments on commit 417e110

Please sign in to comment.