Symfony Elasticsearch configuration file is not working with 1 index for multiple types

96
April 15, 2019, at 05:50 AM

I have the following configuration in my config.yml

fos_elastica:
    clients:
        default: { host: localhost, port: 9200 }
    indexes:      
        app:
            finder: ~            
            types:
                product:
                    properties:
                        name: ~
                        sku: ~
                    persistence:
                        driver: orm
                        model: AppBundle\Entity\Product
                        provider: ~
                        finder: ~
                stock:
                    properties:
                        sku: ~
                        stock: ~
                    persistence:
                        driver: orm
                        model: AppBundle\Entity\ProductStock
                        provider: ~
                        finder: ~

Error

Rejecting mapping update to [app] as the final mapping would have more than 1 type: [stock, product]

If I check the documentation I see the following on there Github page documentation

What am I doing wrong?

Answer 1

It is not a a fault of Symfony integration. Reason is removal of support of multiple types per index introduced by Elasticsearch back in 6.0. You need to update your index definition to only have single type of data per index.

Rent Charter Buses Company
READ ALSO
Access a file outside of root/htdocs on windows in PHP

Access a file outside of root/htdocs on windows in PHP

How can i access a file outside of htdocs folder on windows? I have a config file outside of my root (htdocs) folder, in which i want to save off the configuration for my database connection, but when i call it, it says no file found

142
Why isn't my php json_encode not serializable with .responseJSON in alamofire?

Why isn't my php json_encode not serializable with .responseJSON in alamofire?

I'm having some trouble with serialization on a JSON response on my iOS app from my server, its a PHP back-endMy app sends a post request with the appropriate parameters, validates them, puts the results in an array, and encodes it in

106
Hide HTML code when printing in a textbox

Hide HTML code when printing in a textbox

I'm currently storing a few descriptions in MySQL database that includes some html coding (br, li, etc) when I retrieve it works great (if it is on php) but I am trying to retrieve it within a textbox and I'd like to hide the code

148
Strip html_tags and extra backslashes from TinyMCE <textarea>

Strip html_tags and extra backslashes from TinyMCE <textarea>

I am updating blog posts in my own CMS built in PHP and ran locally on XAMPPI've downloaded the source files for TinyMCE, a WYSIWYG plugin, for adding and editing posts

114