-
Notifications
You must be signed in to change notification settings - Fork 215
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
Too much indexed docs - drop database #133
Comments
The river get the data from oplog.rs not directly from the collection. Did you by any chance drop the collection? |
I droped collection oplog.rs in PRIMARY but not in secondary (replica) Is that a mistake ? |
In that case you should use [1] - https://github.com/richardwilly98/elasticsearch-river-mongodb/wiki#configuration |
Ok, but ,I'm not sure so correct me If I think wrong. So If I drop whole db, and recreate. Then restore data, I shoud get more indexed docs, than exist in my DB ? i just check that case on my Windows workstation. |
|
So I think it's a bug, and shoud be corrected . Because we have incoherent states of indexes |
Can you please clarify? |
To drop db we should:
To drop collection:
|
I believe that bug coud exist on production environment. |
I will create a new feature request to support drop_database.
|
@lukaszpy I will postpone this feature to release 1.7.2
Please provide feedback. |
Is this way like in mongodb? After large node downtime. |
@mahnunchik can you please clarify? |
my versions:
plugins:
-- mapper attachments 1.4.0
-- river jdbc 2.2.1 (driver: postgresql-9.2-1002.jdbc4)
-- elasticsearch-river-mongodb-1.6.11
Problem:
When I creating indexes for Postgre db everything works fine in head plugin for ES I see:
structure - name of index
size: 1mb (1mb)
docs: 3587 (3587)
But when i create index on mongo db I getting:
type - index name
size: 642.6kb (642.6kb)
docs: 10495 (10495)
But in docs field is wrong number of docs, because in my db I have only 3936 docs.
This problem exist on every index on mongo db - count of indexed docs not mach count of docs in db.
I'm creating indexes with ( it's a windows version):
curl -XPUT "http://localhost:9200/_river/body/_meta" -d "{ "type": "mongodb", "mongodb": { "servers": [{host: "localhost", port: "27017" }], "options": {"secondary_read_preference": true}, "credentials": [{db: "fis-bps",user: "guest", password: "guest"}], db: "fis-bps", collection: "body",gridfs: "false"}, index: {name: "body", throttle_size: 2000}}"
This problem only exist on Windows system. On Ubuntu system problem dosn't exist.
I noticed one more think: when I dump my DB, and remove all data for dbs (from data directory for primary and slave). I create databases, create index, and then restore database from dump.
Now i have correct count of indexed docs.
It looks like elasticsearch looks deep into mongo db and normal drop DB and recreate it, still leave some data which are used by elasticsearch to create indexes.
The text was updated successfully, but these errors were encountered: