Search code examples
elasticsearchnest

I get no hits in the response


The NEST client send the a request to this URL:

http://localhost:9200/myindex/product/_search?typed_keys=true

and this doesn't return any results.

But if I send a HTTP request to this URL:

http://localhost:9200/myindex/_search?typed_keys=true

then I get results. Why is this? Have I indexed something wrong?

NEST version: 6.0.2

Elasticsearch version: 6.2.3


Solution

  • Found it out. In case someone should have the same problem in the future.

    When I was indexing my documents, the "model" name was "producthomepagemodel" but in the application in which I query the index I use the model "product". These models have the same properties but the class name is different. It works now.