8000 Updated create_index by writinwaters · Pull Request #1571 · infiniflow/infinity · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Updated create_index #1571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 2, 2024
Merged

Updated create_index #1571

merged 4 commits into from
Aug 2, 2024

Conversation

writinwaters
Copy link
Contributor

What problem does this PR solve?

Issue link:#1490

Type of change

  • Documentation Update

- `"ip"`: Inner product.
- `"l2"`: Euclidean distance.
- `"cosine"`: Cosine similarity.
- Parameter settings for a secondary index:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No parameter.

- `"pq_subspace_num"`: *Required* - Recommended: "32".
- `"pq_subspace_bits"`: *Required* - Recommended: "8".
- Parameter settings for a full text index:
- `"ANALYZER"`: *Optional* - Defaults to `"standard"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other values?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All parameters should be case-insensitive.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These parameters are case-sensitive. @JinHai-CN

The name of the column to build index on. Must not be empty.
- **index_type**: `IndexType`, *Required*
Index type. You may want to import `infinity.index` to set `IndexType`: `from infinity.index import IndexType`
- `Hnsw`: A HNSW index.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HNSW

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hnsw

- **index_param_list**: `list[InitParameter(str, str)]`
A list of `InitParameter` objects specifying parameter settings for the chosen index type. Each object handles one parameter setting. To set a specific index parameter, pass the parameter name and its corresponding value as two separate strings to the `InitParameter` object:
- Parameter settings for an HNSW index:
- `"M"`: *Optional* - Defaults to`"16"`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Case insensitive


### Returns

- Success: An index object.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Return value, should have error message

@JinHai-CN JinHai-CN merged commit c656dcf into infiniflow:main Aug 2, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0