embedmongo-maven-plugin icon indicating copy to clipboard operation
embedmongo-maven-plugin copied to clipboard

Add config option to enable text search

Open sebprunier opened this issue 10 years ago • 14 comments

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

sebprunier avatar Sep 15 '13 22:09 sebprunier

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.

joelittlejohn avatar Sep 15 '13 23:09 joelittlejohn

We can make this change.. Its very easy.

michaelmosmann avatar Jan 30 '14 23:01 michaelmosmann

+1

harley84 avatar Sep 11 '14 08:09 harley84

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.")

michaelmosmann avatar Sep 12 '14 07:09 michaelmosmann

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

michaelmosmann avatar Sep 12 '14 08:09 michaelmosmann

Thanks!

harley84 avatar Sep 12 '14 11:09 harley84

@michaelmosmann fantastic, I'll add something to make use of this feature.

joelittlejohn avatar Sep 12 '14 18:09 joelittlejohn

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.

image

harley84 avatar Sep 14 '14 07:09 harley84

@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 avatar Sep 15 '14 13:09 joelittlejohn

@joelittlejohn , @michaelmosmann I've created a pull request with a test, please take a look.

harley84 avatar Sep 15 '14 16:09 harley84

Hi guys, any chance you can use it? https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo/pull/100

harley84 avatar Sep 25 '14 11:09 harley84

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

joelittlejohn avatar Sep 25 '14 19:09 joelittlejohn

merged the test flapdoodle-oss/de.flapdoodle.embed.mongo#100

matlockx avatar Sep 29 '14 18:09 matlockx

thanks for your contributions, release will take some time, cause i don't have the credentials ...

matlockx avatar Sep 29 '14 18:09 matlockx