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

90%: Treat tables, views, and search differently #57

Merged
merged 2 commits into from
May 21, 2015

Conversation

rsinger
Copy link
Member

@rsinger rsinger commented May 20, 2015

I found when working on #56 that IndexUtils wasn't properly updated to deal with multiple datasources, which causes failures when it runs across tablespecs, viewspecs, and search document specs.

This branch excludes views, search, and table indexes from the regular index regeneration process and then specifically handles views and table rows (search indexes are done via some other mechanism).

@scaleupcto
Copy link
Contributor

What does this mean?

(search indexes are done via some other mechanism)

{
$collection->deleteIndexes();
}
$collection->ensureIndex($indexes, array("background"=>$background));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use sparse='true' here to save disk space

http://php.net/manual/en/mongocollection.ensureindex.php

@rsinger
Copy link
Member Author

rsinger commented May 21, 2015

Search indexes in config are defined differently than the other specs and were never covered under this method.

That said, it probably makes sense to force an ensureIndexes to _id.type on the search doc collections just like the others, will do.

@rsinger
Copy link
Member Author

rsinger commented May 21, 2015

Ah, actually, search documents don't define indexes because we only search via regex, so they'd be useless, anyway. Good reason for not merging tables and search documents, honestly.

rsinger added a commit that referenced this pull request May 21, 2015
…sources

90%: Treat tables, views, and search differently
@rsinger rsinger merged commit c7ffb6f into master May 21, 2015
@rsinger rsinger deleted the update-indexutils-for-multiple-datasources branch May 21, 2015 11:43
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.

2 participants