public void onExecute(StreamMessage input)
    {
        String documentId = null;
        String indexName = null;
        String typeName = null;
        String document = null;

        try
        {
            documentId = this.converter.convertToId(input);
            indexName = this.converter.convertToIndex(input);
            typeName = this.converter.convertToType(input);
            document = this.converter.convertToDocument(input);

            IndexResponse response = this.client.prepareIndex(indexName, typeName, documentId).setSource(
                    document).execute().actionGet();

            if (logger.isDebugEnabled() == true)
            {
                String logFormat = "Document Indexed. Id={0}, Type={1}, Index={2}, Version={3}";
                logger.debug(MessageFormat.format(logFormat, response.getId(), typeName, indexName,
                        response.getVersion()));
            }
        }
        catch (Exception ex)
        {
            String logFormat = "Document Index failed. Dispose Tuple. Id={0}, Type={1}, Index={2}";
            logger.warn(MessageFormat.format(logFormat, documentId, typeName, indexName), ex);
        }
    }
public void onExecute ( StreamMessage input ) { String documentId = null ; String indexName = null ; String typeName = null ; String document = null ; try { documentId = this . converter . convertToId ( input ) ; indexName = this . converter . convertToIndex ( input ) ; typeName = this . converter . convertToType ( input ) ; document = this . converter . convertToDocument ( input ) ; IndexResponse response = this . client . prepareIndex ( indexName , typeName , documentId ) . setSource ( document ) . execute ( ) . actionGet ( ) ; if ( logger . isDebugEnabled ( ) == true ) { String logFormat = "Document Indexed. Id={0}, Type={1}, Index={2}, Version={3}" ; logger . debug ( MessageFormat . format ( logFormat , response . getId ( ) , typeName , indexName , response . getVersion ( ) ) ) ; } } catch ( Exception ex ) { String logFormat = "Document Index failed. Dispose Tuple. Id={0}, Type={1}, Index={2}" ; logger . warn ( MessageFormat . format ( logFormat , documentId , typeName , indexName ) , ex ) ; } }
{@inheritDoc}