Comments (1)
Something like this:
Note that the vector in the "must_not" is the base64 variant. since this is how it is stored in the ES index
{
"query": {
"function_score": {
"query": {
"bool": {
"must_not": [
{
"term": {
"embeddings_vector": "vGcB1j3ytZc+JFH7PI/HjTx6XMU8Fli0vQO0FrqOh3O9fwMyvikswrwrEVG+h6ktveE82747pqY+dDoLvnlL+jyS8Mw8pbXiPou/eT4Wu9W97L7HvTyjMDu7+Fm9T8GOPMR+dL2ybnY8CoWevUnOQb4bMtQ77kkEPYyCrLzOUl49VxWPvdzZP7uy3hE80ZL6vhfc5T0pmKc9HK5TPg96Tz4xNgW+UPPeO/Zu372B+1m9IkAFvqqIG70BUvS+JCYpPqPZTL1Fy1s8nGDPPis2z7wwGoC9WklbPQyj+r3oS8e9mhlXPlv/9j5Gdbk9nTH1vYaLMz0Dvtk9xQYYPaLmwQ=="
}
}
]
}
},
"script_score": {
"script": {
"inline" : "binary_vector_score_v2",
"lang": "knn_v2",
"params": {
"cosine": false,
"field": "embedding_vectorize_job_qm_no_executive_summary",
"vector": [-0.08845212310552597, -0.08906011283397675, 0.24872203171253204, -0.35299643874168396, -0.11405511945486069, 0.007435183506458998, 0.014695641584694386, 0.0810081735253334, 0.08508744835853577, 0.04942350462079048, -0.19382385909557343, -0.3773375451564789, -0.08897750824689865, 0.003388628363609314, 0.19183564186096191, -0.036255933344364166, 0.04452558606863022, -0.24031603336334229, 0.09107230603694916, -0.11518114805221558, 0.01530667394399643, -0.05861687660217285, 0.00039576119161210954, -0.07696657627820969, -0.03465487062931061, -0.16033217310905457, 0.06700161844491959, 0.01648307405412197, 0.006644413806498051, 0.013184583745896816, -0.28751012682914734, -0.16328726708889008, -0.037366461008787155, -0.1065048947930336, 0.1911284625530243, 0.13403065502643585, -0.06778426468372345, -0.13069769740104675, 0.027110543102025986, 0.0690891444683075, -0.022418882697820663, -0.049506377428770065, -0.021799996495246887, 0.008504744619131088, 0.001444319961592555, 0.030824823305010796, -0.10882803797721863, -0.10402989387512207, -0.052981097251176834, -0.1305854469537735, 0.08872780948877335, 0.1431482434272766, 0.08793507516384125, -0.02266979031264782, 0.08263397961854935, -0.07393267750740051, 0.08551567047834396, -0.031177835538983345, 0.06870388984680176, -0.09644845873117447, 0.05066889896988869, 0.10879723727703094, 0.19038785994052887, 0.21654881536960602]
}
}
}
}
},
"size": 10
}
from fast-elasticsearch-vector-scoring.
Related Issues (20)
- Incorrect scores for cosine similarity HOT 2
- Read string field for Document HOT 3
- Response has no hits even though index consists of vectors HOT 1
- plugin install error HOT 1
- Performance Benchmarking ? HOT 4
- Question: Score on multiple vectors HOT 9
- Get NaN score for [Doc_id] HOT 2
- Does the plugin support array of vector? HOT 2
- ERROR: Unknown plugin elasticsearch-binary-vector-scoring-7.5.0.zip HOT 1
- Plugin is not installed on elasticsearch 7.5.2 HOT 1
- change data types HOT 2
- internal algorithm HOT 8
- elasticsearch run on jdk11,but plugin set java version 8, is that ok? HOT 1
- Can you provide version 7.7
- Should we use refresh=true on production? (Test is not suitable for 7.9) HOT 3
- limit the number of returned documents HOT 1
- Get the same results no matter how different the embedded vector HOT 6
- Could you provide a version for ES 7.11.1 ?
- How to achieve ANDing on nested Vectors?
- Wrong result when searching query vector (512,)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fast-elasticsearch-vector-scoring.