Code Monkey home page Code Monkey logo

Failed request line #0 details: {"_index":"ttt.No2","_type":"_doc","_id":"5a9bff2d4e3d6cf0131b07af","status":400,"error":{"type":"invalid_index_name_exception","reason":"Invalid index name [ttt.No2], must be lowercase","index":"ttt.No2"}} about monstache HOT 12 CLOSED

rwynn avatar rwynn commented on August 17, 2024
Failed request line #0 details: {"_index":"ttt.No2","_type":"_doc","_id":"5a9bff2d4e3d6cf0131b07af","status":400,"error":{"type":"invalid_index_name_exception","reason":"Invalid index name [ttt.No2], must be lowercase","index":"ttt.No2"}}

from monstache.

Comments (12)

rwynn avatar rwynn commented on August 17, 2024

See index mapping at https://rwynn.github.io/monstache-site/advanced/ so that you can change index name to lowercase.

from monstache.

rwynn avatar rwynn commented on August 17, 2024

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.

rwynn avatar rwynn commented on August 17, 2024

this should be fixed now in the latest release. thanks.

from monstache.

snoopy83101 avatar snoopy83101 commented on August 17, 2024

Thank you very much for your warm help, although my English is Machine Translation O__O "…

from monstache.

kgrvamsi avatar kgrvamsi commented on August 17, 2024

@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.

rwynn avatar rwynn commented on August 17, 2024

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.

kgrvamsi avatar kgrvamsi commented on August 17, 2024

@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.

rwynn avatar rwynn commented on August 17, 2024

@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.

kgrvamsi avatar kgrvamsi commented on August 17, 2024

@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.

rwynn avatar rwynn commented on August 17, 2024

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.

kgrvamsi avatar kgrvamsi commented on August 17, 2024

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.

rwynn avatar rwynn commented on August 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.