I recently compacted the collection if that helps any.
Thanks,
Patrick
> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
Details at:
http://www.mongodb.org/display/DOCS/Indexes#Indexes-SparseIndexes
If you need to do $exists false queries then use a regular index
instead of a sparse index.
On Thu, Dec 15, 2011 at 2:41 PM, Patrick Scott
Maybe something happened during compaction that screwed up the sparse index.
Thanks for the help,
Patrick
My query is essentially an atomic update:
db.myCollection.update({field1: "something", sparseField:
{$exists:false}}, {$set: {sparseField: "someVal"}}).
I'm using morphia to create a query with a hint index that I pass to
the update operation. Essentially I'm trying to pass the hint index to
the query portion of an update and I have a feeling like that isn't
supported. I tried to recreate it from the shell but it seems like I
can't.
Are hints supported in updates?
On Thu, Dec 15, 2011 at 7:45 PM, Patrick Scott
Feel free to add a jira feature request: http://jira.mongodb.org/
I think this issue should be solved in another way via another bug
fix, but for now this would be the way. Another work around could be
to do the query to get the _id values and then do an $in query with
those values to do the update (in batches). Or you can drop the index,
do the update, recreate the index.
If you plan to fill in values for all those fields then a unique index
won't help, or be useful over a normal one.
On Fri, Dec 16, 2011 at 2:42 PM, Patrick Scott