-
Notifications
You must be signed in to change notification settings - Fork 48
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
Field [elastiknn_dense_float_vector] is defined twice. #176
Comments
@zeppelinen Coincidentally I also ran into a closely related issue when updating to es 7.9.2. I'll keep you posted. I should have some to look into it more this weekend and early next week. |
@zeppelinen Which version are you using? I was trying to reproduce the issue but was actually able to make an index with the following mapping:
|
Interesting.
I was using 7.6.2 with plugin compiled from sources using openjdk-13.
And it looks like I could mess up branches, as I was testing builds against
different elasticsearch versions.
I check environment and update you later.
…On Fri, Oct 23, 2020, 11:12 PM Alex Klibisz ***@***.***> wrote:
@zeppelinen <https://github.com/zeppelinen> Which version are you using?
I was trying to reproduce the issue but was actually able to make an index
with the following mapping:
{
"issue-176" : {
"mappings" : {
"properties" : {
"df0" : {
"type" : "elastiknn_dense_float_vector",
"similarity" : "boolean",
"elastiknn" : {
"dims" : 10
}
},
"df1" : {
"type" : "elastiknn_dense_float_vector",
"similarity" : "boolean",
"elastiknn" : {
"model" : "lsh",
"similarity" : "angular",
"dims" : 10,
"L" : 10,
"k" : 1
}
},
"df2" : {
"type" : "elastiknn_dense_float_vector",
"similarity" : "boolean",
"elastiknn" : {
"model" : "lsh",
"similarity" : "angular",
"dims" : 10,
"L" : 10,
"k" : 1
}
},
"df3" : {
"type" : "elastiknn_dense_float_vector",
"similarity" : "boolean",
"elastiknn" : {
"model" : "lsh",
"similarity" : "l2",
"dims" : 10,
"L" : 21,
"k" : 2,
"w" : 3
}
},
"df4" : {
"type" : "elastiknn_dense_float_vector",
"similarity" : "boolean",
"elastiknn" : {
"model" : "permutation_lsh",
"dims" : 10,
"k" : 22,
"repeating" : false
}
},
"id" : {
"type" : "keyword",
"store" : true
},
"sb0" : {
"type" : "elastiknn_sparse_bool_vector",
"similarity" : "boolean",
"elastiknn" : {
"dims" : 10
}
},
"sb1" : {
"type" : "elastiknn_sparse_bool_vector",
"similarity" : "boolean",
"elastiknn" : {
"model" : "sparse_indexed",
"dims" : 10
}
},
"sb2" : {
"type" : "elastiknn_sparse_bool_vector",
"similarity" : "boolean",
"elastiknn" : {
"model" : "lsh",
"similarity" : "jaccard",
"dims" : 10,
"L" : 10,
"k" : 2
}
},
"sb3" : {
"type" : "elastiknn_sparse_bool_vector",
"similarity" : "boolean",
"elastiknn" : {
"model" : "lsh",
"similarity" : "jaccard",
"dims" : 10,
"L" : 10,
"k" : 2
}
},
"sb4" : {
"type" : "elastiknn_sparse_bool_vector",
"similarity" : "boolean",
"elastiknn" : {
"model" : "lsh",
"similarity" : "hamming",
"dims" : 10,
"L" : 10,
"k" : 3
}
}
}
}
}
}
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#176 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG4UK5KF4K4WWS5VVCBTX23SMHWS7ANCNFSM4S4PACNA>
.
|
… vectors in one doc. (#178) As far as I could tell, Elastiknn was already able to support creating an index and mapping with multiple vectors in the same doc. I added a test to make sure this would work, because it was brought up in an issue: #176 For a while the test was failing, which I thought might be due to not being able to access the mapping. It turned out that I had a typo in the test, so it was trying to query against a field which didn't exist. But in figuring that out, I figured out how to refactor the VectorMapper so that it uses a less-hacky way to lookup the mapping for a given field. It used to make a GetFieldMappingRequest. Now it just uses the QueryShardContext#fieldType method to get a MappedFieldType which contains the mapping. Some more related discussion here: elastic/elasticsearch#64069
I added a test to make sure it's working in #178 . The test creates a mapping like the one above, indexes 100 docs with this mapping, runs a count request to count the number of fields with each field, makes sure the result for each request is 100, then runs a query targeting each of the vector fields and makes sure it returns some neighbors. It's possible there's still some edge case that I hadn't thought of. |
I tested same configuration again using plugin from official project releases page and it works just fine. |
Hi!
First of all thank you for great job.
I fail to create an index with two elastiknn_dense_float_vector fields. I get the following error:
Index with single elastiknn_dense_float_vector field is created with no problems.
Relevant piece of my index mappings:
The text was updated successfully, but these errors were encountered: