-
Notifications
You must be signed in to change notification settings - Fork 585
feat(server): Add vector index #2856
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -43,6 +43,7 @@ | |||||
| import org.apache.hugegraph.schema.VertexLabel; | ||||||
| import org.apache.hugegraph.type.HugeType; | ||||||
| import org.apache.hugegraph.type.define.Action; | ||||||
| import org.apache.hugegraph.type.define.Cardinality; | ||||||
| import org.apache.hugegraph.type.define.CollectionType; | ||||||
| import org.apache.hugegraph.type.define.DataType; | ||||||
| import org.apache.hugegraph.type.define.IndexType; | ||||||
|
|
@@ -390,6 +391,11 @@ public IndexLabelBuilder unique() { | |||||
| return this; | ||||||
| } | ||||||
|
|
||||||
| public IndexLabelBuilder vector() { | ||||||
| this.indexType = IndexType.VECTOR; | ||||||
| return this; | ||||||
| } | ||||||
|
|
||||||
| @Override | ||||||
| public IndexLabelBuilder on(HugeType baseType, String baseValue) { | ||||||
| E.checkArgument(baseType == HugeType.VERTEX_LABEL || | ||||||
|
|
@@ -526,6 +532,21 @@ private void checkFields(Set<Id> propertyIds) { | |||||
| "Search index can only build on text property, " + | ||||||
| "but got %s(%s)", dataType, field); | ||||||
| } | ||||||
|
|
||||||
| // Vector index must build on float list | ||||||
| if(this.indexType.isVector()){ | ||||||
|
||||||
| if(this.indexType.isVector()){ | |
| if (this.indexType.isVector()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I will fix it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I will fix it