Sunday, January 29, 2012

Unexpected crashes of Notes Connector

It happens that Notes Connector is crashing during processing of Lotus Notes database without any specific reason. What is even worst, it usually does not leave any clues in log files. It just exists without any additional information

In my case reason for that behavior were missing fields (on some of Notes documents I was indexing). I was trying to import such field, and perform on it certain operations. This second part was resulting in crash.

It is possible to avoid such situations using ImportRemap. This action can create field with default value in case source field does not exists. It is very handy to keep data consistency of your index.

First we should define field with default value

FixedFieldName0=doc_tmp_default_field
FixedFieldValue0="null"
Let's assume we are importing field doc_field_one

DreField0=doc_tmp_field_one
NotesField0=doc_field_one
To make sure our output field always exists we can use ImportRemap

ImportRemapFieldsCSVsFrom0=doc_tmp_field_one,doc_tmp_default_field
ImportRemapFieldsCSVsTo0=doc_field_one_always_present
This simple trick can save us from unexpected crashes and help keep indexed fields consistent across documents.

No comments:

Post a Comment