Class ElasticSearchIndex

    • Field Detail

      • allowAttributeName

        protected static final java.lang.String allowAttributeName
        The allow attribute name
        See Also:
        Constant Field Values
      • denyAttributeName

        protected static final java.lang.String denyAttributeName
        The deny attribute name
        See Also:
        Constant Field Values
      • noSecurityToken

        protected static final java.lang.String noSecurityToken
        The no-security token
        See Also:
        Constant Field Values
      • useNullValue

        protected static final boolean useNullValue
        Flag set as to whether null_value works in ES. Right now it doesn't work, so we have to do everything in the connector.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ElasticSearchIndex

        public ElasticSearchIndex​(org.apache.http.client.HttpClient client,
                                  ElasticSearchConfig config)
    • Method Detail

      • writeField

        protected static boolean writeField​(java.io.PrintWriter pw,
                                            boolean needComma,
                                            java.lang.String fieldName,
                                            java.lang.String[] fieldValues)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • formatAsString

        protected static java.lang.String formatAsString​(java.util.Date dateValue)
      • writeField

        protected static boolean writeField​(java.io.PrintWriter pw,
                                            boolean needComma,
                                            java.lang.String fieldName,
                                            java.util.Date[] fieldValues)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • writeACLs

        protected static boolean writeACLs​(java.io.PrintWriter pw,
                                           boolean needComma,
                                           java.lang.String aclType,
                                           java.lang.String[] acl,
                                           java.lang.String[] denyAcl)
                                    throws java.io.IOException
        Output an acl level
        Throws:
        java.io.IOException
      • jsonStringEscape

        protected static java.lang.String jsonStringEscape​(java.lang.String value)
      • execute

        public boolean execute​(java.lang.String documentURI,
                               org.apache.manifoldcf.agents.interfaces.RepositoryDocument document,
                               java.io.InputStream inputStream,
                               java.lang.String[] acls,
                               java.lang.String[] denyAcls,
                               java.lang.String[] shareAcls,
                               java.lang.String[] shareDenyAcls,
                               java.lang.String[] parentAcls,
                               java.lang.String[] parentDenyAcls,
                               java.lang.String fullDocumentURI)
                        throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
                               org.apache.manifoldcf.agents.interfaces.ServiceInterruption
        Do the indexing.
        Returns:
        false to indicate that the document was rejected.
        Throws:
        org.apache.manifoldcf.core.interfaces.ManifoldCFException
        org.apache.manifoldcf.agents.interfaces.ServiceInterruption