Class ElasticSearchIndex
- java.lang.Object
-
- org.apache.manifoldcf.agents.output.elasticsearch.ElasticSearchConnection
-
- org.apache.manifoldcf.agents.output.elasticsearch.ElasticSearchIndex
-
public class ElasticSearchIndex extends ElasticSearchConnection
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.manifoldcf.agents.output.elasticsearch.ElasticSearchConnection
ElasticSearchConnection.CallThread, ElasticSearchConnection.Result
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringallowAttributeNameThe allow attribute nameprotected static java.lang.StringdenyAttributeNameThe deny attribute nameprotected static java.lang.StringnoSecurityTokenThe no-security tokenprotected static booleanuseNullValueFlag set as to whether null_value works in ES.-
Fields inherited from class org.apache.manifoldcf.agents.output.elasticsearch.ElasticSearchConnection
config, jsonException
-
-
Constructor Summary
Constructors Constructor Description ElasticSearchIndex(org.apache.http.client.HttpClient client, ElasticSearchConfig config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexecute(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)Do the indexing.protected static java.lang.StringformatAsString(java.util.Date dateValue)protected static java.lang.StringjsonStringEscape(java.lang.String value)protected static booleanwriteACLs(java.io.PrintWriter pw, boolean needComma, java.lang.String aclType, java.lang.String[] acl, java.lang.String[] denyAcl)Output an acl levelprotected static booleanwriteField(java.io.PrintWriter pw, boolean needComma, java.lang.String fieldName, java.lang.String[] fieldValues)protected static booleanwriteField(java.io.PrintWriter pw, boolean needComma, java.lang.String fieldName, java.util.Date[] fieldValues)-
Methods inherited from class org.apache.manifoldcf.agents.output.elasticsearch.ElasticSearchConnection
call, checkJson, getApiUrl, getCallUrlSnippet, getResponse, getResult, getResultCode, getResultDescription, handleHttpException, handleIOException, handleResultCode, setResult, setResultCode
-
-
-
-
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.IOExceptionOutput 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.ServiceInterruptionDo the indexing.- Returns:
- false to indicate that the document was rejected.
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruption
-
-