python-algorithm-plugin icon indicating copy to clipboard operation
python-algorithm-plugin copied to clipboard

DB and space are not used consistent when using different name

Open ziyunxiao opened this issue 4 years ago • 0 comments

Hello,

I discovered that if you use a different name for DB and space, some APIs will return the wrong result. for example, get image by id. Which causes confusion.

To reproduce the issue you can create a DB as "zerobox" and a space as "bottles". Then insert an image into the space after that run API get image by id

# insert image
POST {{vearch_url}}/zerobox/bottles/black1

{
  "keyword": "Black Bottle",
  "url": "/images/test_black_1.jpg",
  "image": {
    "feature": "/images/test_black_1.jpg"
  },
  "tags": [
    "black",
    "straight"
  ]
}

# get image by id
GET {{vearch_url}}/zerobox/bottles/black1

# the result is wrong, it should be found.
{"_index":"zerobox","_type":"bottles","_id":"black1","found":false}

If this is an expected behaviour, it is better documented in README.

Thanks,

Robin

ziyunxiao avatar Mar 15 '21 14:03 ziyunxiao