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

elasticType is no longer used in ElasticSearch, but unable to un-set #128

Open
d2a-raudenaerde opened this issue Jul 14, 2021 · 0 comments

Comments

@d2a-raudenaerde
Copy link

const ReservationsESTC = composeWithElastic({
    graphqlTypeName: 'ReservationsES',
    elasticIndex: 'reservations',
    elasticMapping: reservationMapping,
    elasticType: 'reservations',
    elasticClient: new elasticsearch.Client({
        host: 'http://localhost:9200',
        apiVersion: '7.7',
        log: 'trace',
    }),
    // elastic mapping does not contain information about is fields are arrays or not
    // so provide this information explicitly for obtaining correct types in GraphQL
    pluralFields: ['reviews', 'places', 'cities'],
});

Results in this type of post request:

 POST http://localhost:9200/reservations/_search?type=reservations&q=Boulevard
  {
    "explain": true,
    "version": true,
    "_source": false,
    "track_scores": true
  }

But type=... is no longer supported in ES (7.13)

#! [types removal] Specifying types in search requests is deprecated.

And results in 0 hits, while removeing the type parameter makes it work fine

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

1 participant