Skip to content

Commit

Permalink
Sparse and Dense vector fields
Browse files Browse the repository at this point in the history
Closes #1278
  • Loading branch information
honzakral committed Jan 13, 2020
1 parent 0e4e79e commit 7651c9d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions elasticsearch_dsl/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,16 @@ class Float(Field):
def _deserialize(self, data):
return float(data)

class DenseVector(Float):
name = 'dense_vector'

def __init__(self, dims, **kwargs):
kwargs["multi"] = True
super(DenseVector, self).__init__(dims=dims, **kwargs)

class SparseVector(Field):
name = 'sparse_vector'

class HalfFloat(Float):
name = 'half_float'

Expand Down

0 comments on commit 7651c9d

Please sign in to comment.