Class ElasticContentRequestBuilder
java.lang.Object
org.exoplatform.commons.search.es.client.ElasticContentRequestBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionElasticContentRequestBuilder(org.exoplatform.container.configuration.ConfigurationManager configurationManager, org.exoplatform.container.xml.InitParams initParams) -
Method Summary
Modifier and TypeMethodDescriptiongetCreateDocumentRequestContent(ElasticIndexingServiceConnector connector, String id) Get an ES create document content to insert in a bulk request For instance: { "create" : { "_index" : "blog", "_type" : "post", "_id" : "blog_post_1" } } { "field1" : "value3" }Get an ES create Index request contentGet an ES create/update document content to put into a pipeline The content of the request will update the full document (and not partially) For instance: { "field1" : "value3" }Get a deleteAll ES querygetDeleteDocumentRequestContent(ElasticIndexingServiceConnector connector, String id) Get an ES delete document content to insert in a bulk request For instance: { "delete" : { "_index" : "blog", "_type" : "post", "_id" : "blog_post_1" } }getUpdateDocumentRequestContent(ElasticIndexingServiceConnector connector, String id) Get an ES update document content to insert in a bulk request We use the create api to reindex the full document (and not partially) For instance: { "create" : { "_index" : "blog", "_type" : "post", "_id" : "blog_post_1" } } { "field1" : "value3" }
-
Constructor Details
-
ElasticContentRequestBuilder
public ElasticContentRequestBuilder(org.exoplatform.container.configuration.ConfigurationManager configurationManager, org.exoplatform.container.xml.InitParams initParams) -
ElasticContentRequestBuilder
public ElasticContentRequestBuilder()
-
-
Method Details
-
getCreateIndexRequestContent
Get an ES create Index request content- Parameters:
connector- ES connector- Returns:
- JSON containing a create index request content
-
getDeleteAllDocumentsRequestContent
Get a deleteAll ES query- Returns:
- JSON containing a delete request
-
getDeleteDocumentRequestContent
Get an ES delete document content to insert in a bulk request For instance: { "delete" : { "_index" : "blog", "_type" : "post", "_id" : "blog_post_1" } }- Returns:
- JSON containing a delete request
-
getCreateDocumentRequestContent
Get an ES create document content to insert in a bulk request For instance: { "create" : { "_index" : "blog", "_type" : "post", "_id" : "blog_post_1" } } { "field1" : "value3" }- Returns:
- JSON containing a create document request
-
getCreatePipelineDocumentRequestContent
public String getCreatePipelineDocumentRequestContent(ElasticIndexingServiceConnector connector, String id) Get an ES create/update document content to put into a pipeline The content of the request will update the full document (and not partially) For instance: { "field1" : "value3" }- Returns:
- JSON containing a create/update Document to inject to a pipeline
-
getUpdateDocumentRequestContent
Get an ES update document content to insert in a bulk request We use the create api to reindex the full document (and not partially) For instance: { "create" : { "_index" : "blog", "_type" : "post", "_id" : "blog_post_1" } } { "field1" : "value3" }- Returns:
- JSON containing an update document request
-
getDefaultSettings
-