alleyinteractive / searchpress

Elasticsearch integration for WordPress.
87 stars 12 forks source link

Document store cannot be created #97

Open dz0ny opened 6 years ago

dz0ny commented 6 years ago

PUT https://u:p@elasti_relelase_v6_0/domain.tld Request:

 {"settings":{"analysis":{"analyzer":{"default":{"tokenizer":"standard","filter":["standard","sp_word_delimiter","lowercase","stop","sp_snowball"],"language":"English"}},"filter":{"sp_word_delimiter":{"type":"word_delimiter","preserve_original":true},"sp_snowball":{"type":"snowball","language":"English"}}}},"mappings":{"post":{"date_detection":false,"dynamic_templates":[{"template_meta":{"path_match":"post_meta.*","mapping":{"type":"object","properties":{"value":{"type":"string"},"raw":{"type":"string","index":"not_analyzed","include_in_all":false},"long":{"type":"long"},"double":{"type":"double"},"boolean":{"type":"boolean"},"date":{"type":"date","format":"YYYY-MM-dd"},"datetime":{"type":"date","format":"YYYY-MM-dd HH:mm:ss"},"time":{"type":"date","format":"HH:mm:ss"}}}}},{"template_terms":{"path_match":"terms.*","mapping":{"type":"object","properties":{"name":{"type":"string","fields":{"raw":{"type":"string","index":"not_analyzed","include_in_all":false}}},"term_id":{"type":"long"},"parent":{"type":"long"},"slug":{"type":"string","index":"not_analyzed"}}}}}],"_all":{"analyzer":"simple"},"properties":{"post_id":{"type":"long","include_in_all":false},"post_author":{"type":"object","properties":{"user_id":{"type":"long","include_in_all":false},"display_name":{"type":"string"},"login":{"type":"string","index":"not_analyzed"},"user_nicename":{"type":"string","index":"not_analyzed"}}},"post_date":{"type":"object","include_in_all":false,"properties":{"date":{"type":"date","format":"YYYY-MM-dd HH:mm:ss||YYYY-MM-dd"},"year":{"type":"short"},"month":{"type":"byte"},"day":{"type":"byte"},"hour":{"type":"byte"},"minute":{"type":"byte"},"second":{"type":"byte"},"week":{"type":"byte"},"day_of_week":{"type":"byte"},"day_of_year":{"type":"short"},"seconds_from_day":{"type":"integer"},"seconds_from_hour":{"type":"short"}}},"post_date_gmt":{"type":"object","include_in_all":false,"properties":{"date":{"type":"date","format":"YYYY-MM-dd HH:mm:ss||YYYY-MM-dd"},"year":{"type":"short"},"month":{"type":"byte"},"day":{"type":"byte"},"hour":{"type":"byte"},"minute":{"type":"byte"},"second":{"type":"byte"},"week":{"type":"byte"},"day_of_week":{"type":"byte"},"day_of_year":{"type":"short"},"seconds_from_day":{"type":"integer"},"seconds_from_hour":{"type":"short"}}},"post_modified":{"type":"object","include_in_all":false,"properties":{"date":{"type":"date","format":"YYYY-MM-dd HH:mm:ss||YYYY-MM-dd"},"year":{"type":"short"},"month":{"type":"byte"},"day":{"type":"byte"},"hour":{"type":"byte"},"minute":{"type":"byte"},"second":{"type":"byte"},"week":{"type":"byte"},"day_of_week":{"type":"byte"},"day_of_year":{"type":"short"},"seconds_from_day":{"type":"integer"},"seconds_from_hour":{"type":"short"}}},"post_modified_gmt":{"type":"object","include_in_all":false,"properties":{"date":{"type":"date","format":"YYYY-MM-dd HH:mm:ss||YYYY-MM-dd"},"year":{"type":"short"},"month":{"type":"byte"},"day":{"type":"byte"},"hour":{"type":"byte"},"minute":{"type":"byte"},"second":{"type":"byte"},"week":{"type":"byte"},"day_of_week":{"type":"byte"},"day_of_year":{"type":"short"},"seconds_from_day":{"type":"integer"},"seconds_from_hour":{"type":"short"}}},"post_title":{"type":"string","fields":{"raw":{"type":"string","index":"not_analyzed","include_in_all":false}}},"post_excerpt":{"type":"string"},"post_content":{"type":"string"},"post_status":{"type":"string","index":"not_analyzed","include_in_all":false},"parent_status":{"type":"string","index":"not_analyzed","include_in_all":false},"post_name":{"type":"string","fields":{"raw":{"type":"string","index":"not_analyzed","include_in_all":false}}},"post_parent":{"type":"long","include_in_all":false},"post_type":{"type":"string","fields":{"raw":{"type":"string","index":"not_analyzed","include_in_all":false}}},"post_mime_type":{"type":"string","index":"not_analyzed","include_in_all":false},"post_password":{"type":"string","index":"not_analyzed","include_in_all":false},"menu_order":{"type":"integer"},"permalink":{"type":"string"},"terms":{"type":"object"},"post_meta":{"type":"object"}}}}}

Response

{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"No handler for type [string] declared on field [post_title]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [post]: No handler for type [string] declared on field [post_title]","caused_by":{"type":"mapper_parsing_exception","reason":"No handler for type [string] declared on field [post_title]"}},"status":400}

All indexing action then also fail. I've tested it against https://bonsai.io EL hosting.

mboynes commented 6 years ago

See #94. You can check out this branch to use ES 6.x until it gets merged into master