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

There are no easy way to update aggregated fields of all documents after changes in views or post-processing #9

Open
dchaplinsky opened this issue Nov 12, 2017 · 2 comments

Comments

@dchaplinsky
Copy link
Collaborator

To do so you need to provide full list of document ids in the couchdb (and there are no easy way to generate such list).

@excieve
Copy link
Owner

excieve commented Nov 12, 2017

Yes, it would be great to add a "full repump" mode to the pump.

@dchaplinsky
Copy link
Collaborator Author

fp = open("/tmp/full_state", "w")
with couchdb('XXXXX', 'XXXXXX', url='http://127.0.0.1:5984') as couch:
    db = couch["declarations"]
    with db.custom_result(include_docs=False, page_size=50000) as result:
        for i, r in enumerate(result):
            fp.write(r["id"] + "\n")
            if i and i % 50000 == 0:
                print(i)
fp.close()

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

2 participants