Hi, Karl.

Karl Wright wrote:
>I have now updated (I think) everything that this patch actually has, save
>for one deprecated field substitution (the "types" field is now the "doc_"

I've confirmed the updated sources via git://git.apache.org/manifoldcf.git,
to find some problem in the following codes.

connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch/ElasticSearchIndex.java:
        if (useIngesterAttachment && inputStream != null) {
        ...(Clause1)...
        }
        if (useMapperAttachments && inputStream != null) {
        ...(Clause2)...
        }
        if (!useMapperAttachments && inputStream != null) {
        ...(Clause3)...
        }

In the default case, it executes only Clause3.
If useMapperAttachments is set, it executes only Clause2.
(Both of useMapperAttachments and useIngesterAttachment will be never set.)
But if useIngesterAttachment is set, it executes Clause1 and Clause3.
These clause must be exclusive.
Each of Clause1 and Clause3 provides contentAttributeName field.
If both of them is executed, this field will be duplicated.

Please fix them as the following.
        if (!useIngesterAttachment && !useMapperAttachments && inputStream != 
null) {
        ...(Clause3)...
        }


P.S.
Where is "Ingester" from?
The strict name of plugin is "Ingest Attachment Processor Plugin".
https://www.elastic.co/guide/en/elasticsearch/plugins/current/ingest-attachment.html

P.S.2
The stritc name of product is not "ElasticSearch" but "Elasticsearch".
https://www.elastic.co/what-is/elasticsearch

----
Nintendo, Co., Ltd.
Product Technology Dept.
Takashi SHIRAI
PHONE: +81-75-662-9600
mailto:shi...@nintendo.co.jp

Reply via email to