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.99k stars 500 forks source link

auto-schema creates a table and fails at the same time #2623

Open sanikolaev opened 2 weeks ago

sanikolaev commented 2 weeks ago

Bug Description:

➜  ~ mysql -P9306 -h0 -e "drop table products"; curl -sX POST http://0:9308/products/_create/ -d '{   "title": "Yellow Bag with Tassel",   "price": 19.85 }'
ERROR 1064 (42000) at line 1: DROP TABLE failed: unknown table 'products'
{"error":{"type":"illegal_argument_exception","reason":"Rejecting mapping update to [products] as the final mapping would have more than 1 type: [_doc, _create]"},"status":400}%
➜  ~ mysql -P9306 -h0 -e "desc products"
+-------+--------+----------------+
| Field | Type   | Properties     |
+-------+--------+----------------+
| id    | bigint |                |
| title | text   | indexed stored |
| price | float  |                |
+-------+--------+----------------+

Expected:

Manticore Search Version:

Manticore 6.3.7 2998f4827@24092705 dev (columnar 2.3.1 f9ef8b9@24090411) (secondary 2.3.1 f9ef8b9@24090411) (knn 2.3.1 f9ef8b9@24090411)

Operating System Version:

macos

Have you tried the latest development version?

None

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](https://docs.google.com/spreadsheets/d/1mz_3dRWKs86FjRF7EIZUziUDK_2Hvhd97G0pLpxo05s/edit?pli=1&gid=1102439133) updated
Nick-S-2018 commented 6 days ago

Fixed in https://github.com/manticoresoftware/buddy-core/commit/9ef7a700001b12cc7a979648882f2cc2542f9468

sanikolaev commented 6 days ago

Pls check the checklist items.