embedmongo-maven-plugin
embedmongo-maven-plugin copied to clipboard
Add config option to enable text search
Hello, I can't find any way to activate the text search (--setParameter textSearchEnabled=true). Is there a way to do it, or does the plugin need a patch ?
Thanks ! Sébastien
If it's in the de.flapdoodle.embed.mongo API then we can add it here. I don't think the API accommodates --setParameter
though so I suspect this might need a patch to MongodConfigBuilder.
It would be nice to have some property in the Maven plugin config that allowed you to add any additional command line args you wish. It doesn't seem worth adding explicit support for every one of the setParameter options, but it would be good to allow a custom command line arg string so that this kind of additional arg could be added.
We can make this change.. Its very easy.
+1
are you using version mongodb older than 2.6? (http://docs.mongodb.org/manual/core/index-text/ .. "Changed in version 2.6: MongoDB enables the text search feature by default. In MongoDB 2.4, you need to enable the text search feature manually to create text indexes and perform text search.")
Did a new release. You can enable text search for mongodb 2.4 with a config option (see https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo#custom-command-line-options ).
Thanks!
@michaelmosmann fantastic, I'll add something to make use of this feature.
Exception is thrown in my case when trying to enable the text search on windows. I guess that the set parameter command should be split to two like the port is.
@harley84 What's the exception? It's probably worth submitting a simple pull request to change this method:
https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo/blob/10218b6092fa91baa05fba9654c41e68c3b28705/src/main/java/de/flapdoodle/embed/mongo/runtime/Mongod.java#L176
@joelittlejohn , @michaelmosmann I've created a pull request with a test, please take a look.
Hi guys, any chance you can use it? https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo/pull/100
@harley84 I don't have commit access to flapdoodle-oss/de.flapdoodle.embed.mongo. Once that pull request is merged and a new version is released I'll make some changes here to support a new config value like:
<textSearchEnabled>true</textSearchEnabled>
merged the test flapdoodle-oss/de.flapdoodle.embed.mongo#100
thanks for your contributions, release will take some time, cause i don't have the credentials ...