manticoresoftware / manticoresearch

Easy to use open source fast database for search | Good alternative to Elasticsearch now | Drop-in replacement for E in the ELK soon
https://manticoresearch.com
GNU General Public License v3.0
8.97k stars 497 forks source link

Setting doc id inside 'doc' fails /bulk insert #2299

Open Nick-S-2018 opened 4 months ago

Nick-S-2018 commented 4 months ago

Bug Description:

If I try to set a doc id inside the 'doc' object, insert does not happen.

curl localhost:9308/cli -d 'create table test(f text)';
Query OK, 0 rows affected (0.002 sec)

curl localhost:9308/bulk -H "Content-Type: application/x-ndjson" -d '
{"insert": {"index": "test", "doc":  {"f": "a", "id": 1}}}
'
[{"total":0,"error":"","warning":""}]

curl localhost:9308/cli -d 'select * from test';
Empty set (0.001 sec)

From Buddy log, I can see the following error happening in this case: request data: {"type":"unknown json request","error":"column 'id' specified twice","version":2,"message":{"path_query":"/bulk","body":"","http_method":"POST"}}

Manticore Search Version:

Manticore 6.3.1 00e77610d@24052911 dev

Operating System Version:

Ununtu 22.04 LTS

Have you tried the latest development version?

Yes

Internal Checklist:

To be completed by the assignee. Check off tasks that have been completed or are not applicable.

- [ ] Implementation completed - [ ] Tests developed - [ ] Documentation updated - [ ] Documentation reviewed - [ ] Changelog updated
Nick-S-2018 commented 4 months ago

Related to https://github.com/manticoresoftware/manticoresearch/issues/2282