Norconex / committer-core

Norconex Committer is a java library and command line application used to route content to local or remote target repositories, such as a search engine index.
http://www.norconex.com/collectors/committer-core
Apache License 2.0
4 stars 10 forks source link

JSON Exporter Formatting Issue #18

Closed butchersoft1 closed 5 years ago

butchersoft1 commented 5 years ago

When exporting records using the JSON not property formatted

            <committer class="com.norconex.committer.core.impl.JSONFileCommitter">
                <directory>${workdir}/json</directory>
                <pretty>false</pretty>
                <docsPerFile>500</docsPerFile>
                <compress>true</compress>
                <splitAddDelete>true</splitAddDelete>
                <fileNamePrefix>js</fileNamePrefix>
                <fileNameSuffix></fileNameSuffix>
            </committer>

the metadata field is not formatted as JSON but as an "ObservableMap " object

Example "metadata": "ObservableMap [map=ObservableMap [map=ObservableMap [map={dacl=[public, everyone], title=[This looks like the title], modified=[2018-12-09]

essiembre commented 5 years ago

A new Committer Core snapshot release was just made with a fix for this. Please give it a try and confirm.

butchersoft1 commented 5 years ago

Thanks, sorry for the delay in response, Christmas break. Ran a quick test today and the metadata field is now correctly parsing into JSON

essiembre commented 5 years ago

Great. Thanks for confirming.

butchersoft1 commented 4 years ago

Hello essiembre,

I had to upgrade to take advantage of some of your new features including limiting the length of text fields.

This issue appears to have returned - tested on 2.8 and latest 2.91 snapshots

Yours Butchersoft

essiembre commented 4 years ago

I am not able to reproduce the issue. Can you confirm in your lib directory you have the latest committer-core version? It should be 2.1.3. Also verify you have norconex-commons-lang 1.15.1. Make sure you have no duplicate jar versions.

butchersoft1 commented 4 years ago

Hello Essiembre,

Thanks for the file check - I could see the following which does appear to show duplicates

09/20/2019 02:36 PM 199,692 norconex-collector-core-1.10.0-SNAPSHOT.jar 09/20/2019 02:41 PM 399,632 norconex-collector-http-2.9.0-SNAPSHOT.jar 01/09/2018 09:12 PM 16,875 norconex-committer-azuresearch-1.1.1.jar 12/18/2017 11:17 PM 59,767 norconex-committer-core-2.1.2.jar 01/05/2019 06:36 PM 59,815 norconex-committer-core-2.1.3-SNAPSHOT.jar 12/13/2017 12:06 AM 239,943 norconex-commons-lang-1.14.0.jar 07/29/2019 05:42 PM 244,011 norconex-commons-lang-1.15.1-SNAPSHOT.jar 07/03/2019 12:27 AM 527,217 norconex-importer-2.10.0-SNAPSHOT.jar 09/20/2019 02:32 PM 94,620 norconex-jef-4.1.2-SNAPSHOT.jar

I removed the items in Italic and this has resolved the problem

Thanks you