I want to change input_file_path = "C:\\Marklogic\\database-image\\data"
to ".*database-image//data.*
" but this regex is not working in this commend. Is It something wrong with my regex?
Asked
Active
Viewed 58 times
1

Mads Hansen
- 63,927
- 12
- 112
- 147

Michal Sobanski
- 121
- 9
-
It would be helpful if you posted the options that you were applying when you say that it is not working, so that we can see what you have tried and where the issue may be. For instance, are you specifying the `.*database-image//data.*` value in the `-input_file_path` option, or `-input_file_pattern` option? What is the base path that you want to be loading from? When you say "not working", what does that mean? Errors or not filtering as expected? Also, to escape a forward slash it is `\/` not `//`. – Mads Hansen Jul 24 '22 at 13:26
-
I want to change it in input_file_path. In MarkLogic doc the input_file_path is described like this: "A regular expression describing the filesystem location(s) to use for input". I try this regex: .*database-image.data.* but It is not working too. – Michal Sobanski Jul 25 '22 at 07:23
-
Okay, yes I see. I wasn't sure if you were looking to modify the URIs on insert, or were using `input_file_pattern` option, but it does say that `input_file_path` can be a regex. I'm having trouble as well, digging in to see what's up – Mads Hansen Jul 25 '22 at 12:50
-
I'm not sure if this is a bug in the implementation, or just a mistake in the documentation, but I haven't been able to find a way to use a regex pattern for `-input_file_path`. I have filed an internal bug in order to get it sorted out, but either way it does not appear to be an option at the moment. There may be workarounds. Can you explain what your directories/files and requirements are, and maybe we can find a workaround with other options? – Mads Hansen Jul 26 '22 at 12:58
-
Yes, its probably typo in documentation. I will try to create import task in ml-gradle then use gradle to get current directory + input_file_pattern. Thanks for help :) – Michal Sobanski Jul 29 '22 at 11:04
1 Answers
1
My workaround:
- Create import task in ml-gradle.
- From gradle get current directory.
- Use input_file_pattern to get correct documents.

Michal Sobanski
- 121
- 9