Skip to content
This repository has been archived by the owner on Apr 20, 2020. It is now read-only.

How can i search similar images by vector in _aknn_search? #11

Open
arpsyapathy opened this issue Mar 7, 2019 · 2 comments
Open

How can i search similar images by vector in _aknn_search? #11

arpsyapathy opened this issue Mar 7, 2019 · 2 comments

Comments

@arpsyapathy
Copy link

Hello!

For example, i have index base and i have one vector of image for search similar of it.

How can i search similar images by vector in _aknn_search?

How to pass a vector for search by /_aknn_search?

I don.t understand from README...

Help me please. Thank you advance

@SthPhoenix
Copy link

Hi! It's not possible in original plugin at the moment, but you can try my fork.

It has _aknn_search_vec endpoint, which can be used like this:

 ```
 POST <elasticsearch host>:9200/_aknn_search_vec

 {
     "_index":       "twitter_images",
     "_type":        "_doc",
     "_aknn_uri":    "aknn_models/_doc/twitter_images"
     "query_aknn": {
             "_aknn_vector": [0.12, 0.23, ...],
             "k1":1000,
             "k2":100
      }, 
      "filter":{
           "range":{
              "post_date":{
                     "gte":"now-1d"
              }  
           }
      }
 }
 ```

As you can see it also supports filter context.
Also it has pre-compiled binaries for ES 6.4.1-6.5.4

@arpsyapathy
Copy link
Author

@SthPhoenix Thank you!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants