Skip to content

Conversation

@streetlib
Copy link

I found there could be a problem if you don't index the MongoDB _id field and you try to use hydrate option.

Basically the problem is the _id comes as string if you doesn't index it and so this query query = model.find({_id: {$in: ids}}) fails (cannot find any document).

To reproduce the issue, you have to change your MongoDB schema with _id: { es_indexed: false }, then you should synchronize and finally try to do a query with hydrate option set true.

You should see the hits only with the hydrate set to false.

albanm and others added 30 commits April 1, 2014 20:30
More dynamic version info
Prior, only geo_point were kept in the mapping.
In my tests, the mapping format returned by the getMapping function is
not the same between 0.90.11 and 1.0
Enveloppe corners were in wrong order resulting in a bad test.
Provided fix for etting first level `hits` field of search results when
used hydrate
…hydrate-hits

Cubuzoa/feature/hydrate hits
…ulk-and-array-indexing

Albanm/feature/bulk and array indexing
guumaster and others added 30 commits September 7, 2015 17:37
…pdate-empty

fix(postSave): fix findOneAndUpdate if document doesn't exist
removed gulp dependency. moved to ESLint instead of jshint/jscs
…eralls

updated yml config for travisci and coveralls
Recognizes an es_type of nested with es_fields and maps it
Check if they are strings or ObjectIds
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

Successfully merging this pull request may close these issues.