Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapping fields in ElasticSearch 7.* #223

Open
singhgursharnbir opened this issue Jun 2, 2020 · 5 comments
Open

Mapping fields in ElasticSearch 7.* #223

singhgursharnbir opened this issue Jun 2, 2020 · 5 comments

Comments

@singhgursharnbir
Copy link

How do I map field in latest version of Elastic search as type is removed and when I try to use put mapping it gives me error

"illegal_argument_exception","reason":"Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true"

@hrodriguez758
Copy link

I have the same issue, do you have any updates?

@singhgursharnbir
Copy link
Author

I think there is no solution to this in this package, it doesnt support new versions of Elastic Search really well.. look into elastic search's own package I think its called Elastic_php something.. I am putting elastic search on back burner for now

@hrodriguez758
Copy link

I found the solution just add this code in your model

    /**
     * Gets the type name to be used in elastic search.
     */
    function getTypeName()
    {
        return '';
    }

by default, this package gets the name types and in our case, we don't need the type name

@devglrd
Copy link

devglrd commented Jul 22, 2020

Nice that work for me !

@piep14
Copy link

piep14 commented Feb 9, 2022

Hello,

Is there a solution to this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants