use of io.zulia.client.command.DeleteAssociated in project zuliasearch by zuliaio.
the class FileStorageTest method storeFile.
private void storeFile(String documentId, String filename, Document meta, byte[] content) throws Exception {
zuliaWorkPool.delete(new DeleteAssociated(documentId, TEST_INDEX, filename));
if (content.length > 32 * 1024 * 1024) {
StoreLargeAssociated storeLargeAssociated = new StoreLargeAssociated(documentId, TEST_INDEX, filename, content);
storeLargeAssociated.setMeta(meta);
zuliaWorkPool.storeLargeAssociated(storeLargeAssociated);
} else {
Store associatedDocStore = new Store(documentId, TEST_INDEX);
associatedDocStore.addAssociatedDocument(AssociatedBuilder.newBuilder().setDocument(content).setFilename(filename).setMetadata(meta));
zuliaWorkPool.store(associatedDocStore);
}
}
Aggregations