[ 
https://issues.apache.org/jira/browse/CONNECTORS-840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13853086#comment-13853086
 ] 

Alessandro Benedetti commented on CONNECTORS-840:
-------------------------------------------------

Ok, looking to the code I find really difficult to test the Solr HttpPoster , 
because it's a very huge class with inner classes inside. 
And this make really difficult to work with Mocks and verify in a safe way that 
the modifications introduced are safe.

Sadly it's not possible to refactor that code , because with no unit tests , 
it's not easy to do that ...
It would be good if the creator of the Solr Connector would be able to write 
the unit tests, in the way that refactoring will be straight forward and 
testing new features as well.
Of course, at the moment we can simply partially test the patch, as the 
modifications will be really small.

But for the future, it will be really important to have unit tests.

Probably tomorrow we will upload the patch with the modifications to the build 
files, pom.xml,backend and ui .




> Job - Solr Mapping Improvement
> ------------------------------
>
>                 Key: CONNECTORS-840
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-840
>             Project: ManifoldCF
>          Issue Type: Improvement
>          Components: Solr-4.x-component
>    Affects Versions: ManifoldCF 1.4.1
>            Reporter: Alessandro Benedetti
>            Assignee: Karl Wright
>            Priority: Minor
>              Labels: field, mapping, request, solr, update
>             Fix For: ManifoldCF 1.5
>
>
> "When you configure a job to use a Solr-type output connection, the Solr 
> connection type provides a tab called "Field Mapping". The purpose of this 
> tab is to allow you to map metadata fields as fetched by the job's connection 
> type to fields that Solr is set up to receive. This is necessary because the 
> names of the metadata items are often determined by the repository, with no 
> alignment to fields defined in the Solr schema. You may also suppress 
> specific metadata items from being sent to the index using this tab. 
> Add a new mapping by filling in the "source" with the name of the metadata 
> item from the repository, and "target" as the name of the output field in 
> Solr, and click the "Add" button. Leaving the "target" field blank will 
> result in all metadata items of that name not being sent to Solr."
> In my opinion we should change the way a metadata field is suppressed.
> The most natural way is that we express only the mappings of the metadata 
> fields we want to keep.
> All the missing params will not be sent to Solr.
> The improvement will be :
> - same interface with a boolean flag in addition, this flag will specify if 
> the missing metadata fields not expressed should be sent to Solr with the 
> original names or not sent at all.
> In this way if we want to keep 3/100 metadata fields, we don't have to write 
> 100 mapping entries , 97 empty but simply 3 entries and activate the flag.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to