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

How create index? #12

Open
arpsyapathy opened this issue Mar 24, 2019 · 1 comment
Open

How create index? #12

arpsyapathy opened this issue Mar 24, 2019 · 1 comment

Comments

@arpsyapathy
Copy link

Hello!
I try to create index:

POST <elasticsearch host>:9200/_aknn_create 

{
    "_index":   "aknn_models",
    "_type":    "aknn_model",
    "_id":      "twitter_image_search",
    "_source": {
        "_aknn_description": "LSH model for Twitter image similarity search",
        "_aknn_nb_tables": 1,
        "_aknn_nb_bits_per_table": 3,
        "_aknn_nb_dimensions": 1000
    },
    "_aknn_vector_sample": [
        [0.11, 0.22, 0.11],
        [0.22, 0.33, 0.22],
        [0.88, 0.99, 0.33]
    ]
}

But i get error:

{
    "error": {
        "root_cause": [
            {
                "type": "index_out_of_bounds_exception",
                "reason": "Index 3 out of bounds for length 3"
            }
        ],
        "type": "index_out_of_bounds_exception",
        "reason": "Index 3 out of bounds for length 3"
    },
    "status": 500
}

How create index? What i do wrong?
Thank you advanced

@vulong3896
Copy link

I think that is a mistake in README, your aknn_vector_sample shape should be (6, 1000)

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