Comments (12)
See index mapping at https://rwynn.github.io/monstache-site/advanced/ so that you can change index name to lowercase.
from monstache.
added a fix to master and rel3 branches to do this automatically. will be in next release. For now you can use a custom index mapping.
from monstache.
this should be fixed now in the latest release. thanks.
from monstache.
Thank you very much for your warm help, although my English is Machine Translation O__O "β¦
from monstache.
@rwynn do you mean that if the collection name is like Employee then mapping should be like
[[mapping]]
namespace = "test.employee"
index = "test"
type = "employee"
from monstache.
If the collection name is Employee
then the mapping should be
[[mapping]]
namespace = "test.Employee"
index = "test"
type = "employee"
Monstache will only lowercase you index names since ES does not allow otherwise. MongoDB namespace is whatever you have in MongoDB.
from monstache.
@rwynn your library rocks and it helped me alot (was using mongo-connector before) and can i use this in production and here are my settings that i want to use.(please advice if these values makes sense)
gzip = true
stats = true
index-stats = true
mongo-url = "mongodb://root:[email protected]:27017/connectortest"
elasticsearch-urls = ["http://192.168.0.46:9200"]
elasticsearch-user = "elastic"
elasticsearch-password = "elasticpassword"
elasticsearch-max-conns = 10
dropped-collections = true
dropped-databases = true
replay = false
resume = true
resume-write-unsafe = false
resume-name = "default"
verbose = true
direct-read-namespaces = ["connectortest.syncthis","connectortest.vamsi"]
[[mapping]]
namespace = "connectortest.syncthis"
index = "connectortest"
type = "syncthis"
[[mapping]]
namespace = "connectortest.vamsi"
index = "connectortest"
type = "vamsi"
from monstache.
@kgrvamsi thanks and those settings look fine. Just read the comments on this issue to understand the implications of syncing 2 collections to the same index. #49
from monstache.
@rwynn if i create different indexes for the same table what would be the settings i need to use?
( namespace-regex = '^mydb\.(mycollection|\$cmd)$'
)
I'm not sure if on the pattern of collection that i may end up as there are 50 collections with different names.
from monstache.
If by that you mean you want to index anything in mydb
then you could use
namespace-regex = '^mydb\.'
That will include database and collection drops resulting in a delete index. If you don't want that you can turn those off globally
dropped-databases = false
dropped-collections = false
You can test expressions here https://golang.org/pkg/regexp/. If the namespace matches then the operation will be not be ignored.
from monstache.
if i'm trying to sync the data for the first time then i can use drop-database and dropped-collections to true right?will that impact if i restart the monstache by deleting the old indexes created in ES?
from monstache.
When those are true it just means that if you issue a drop db/collection in Mongodb that will be synced to ES which means index deletes sent.
If they are false monstache ignores that type of operation. It would then only delete individual docs when you delete those in MongoDB.
Itβs probably safest to set those both to false and manually delete indexes in ES if you want to.
from monstache.
Related Issues (20)
- Bug: Setting mongodb field value to null does not index it in Elasticsearch HOT 5
- Add an option to include mongo change stream in health check
- Obsessive-compulsive reading disorder
- golang plugin can't be mounted without building plugin from source code
- Is there a way to know lag / total pending sync
- decending sorting HOT 1
- Monstache monitoring HOT 1
- Migrating mongodb to ES, but lost _id ?
- Does each worker open a new change steam in monstache when it is running with multiple workers?
- cant build plugin for ARM64
- How to keep an embedded document in full sync?
- Docker container exits without error after 5 days despite restart=always HOT 1
- Elasticsearch 8 with PKI auth
- How to get reference field data in transform script HOT 1
- Token resume lead to Mongo HIGH CPU usage
- How can i return multiple after comparing data?
- monstache - problem reading from MongoDB secondaries. HOT 1
- Add default expose port of 8080 to Dockerfile
- Add elasticsearch-healthcheck-timeout as an argument HOT 1
- Repositories/ Dockerfiles for monstache base images HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monstache.