Imagine you have this array
[10.3, 14, 12.4, 3.5]
and in your DB you also have two documents with those arrays:
First document -> [10, 13.1, 0, -10]
Second document -> [0, 0, 0, 0]
Now imagine that you have +1000000 documents with the same two arrays (alterning between each one)... Is there any way to get all documents that have similar values as your current array?
I mean, something like this:
...
.where("array", "isSimilar", yourArray)
.get()
So that I get all documents which have the array:
[10, 13.1, 0, -10]
Or the only way is to download every single document, something that can be really slow, and then iterate and search the most similar? I think this can be really interesting when talking about "similar points positions", "weeks in which a user has lost similar weight", ...
Thanks.