Skip to content

Commit

Permalink
make manager simple
Browse files Browse the repository at this point in the history
  • Loading branch information
otaviojava committed Jun 27, 2019
1 parent 479eda6 commit a332d5e
Showing 1 changed file with 1 addition and 6 deletions.
Expand Up @@ -15,7 +15,6 @@

package org.jnosql.diana.solr.document;

import jakarta.nosql.SortType;
import jakarta.nosql.document.DocumentCollectionManager;
import jakarta.nosql.document.DocumentDeleteQuery;
import jakarta.nosql.document.DocumentEntity;
Expand All @@ -26,16 +25,13 @@
import org.apache.solr.client.solrj.impl.HttpSolrClient;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.common.SolrDocumentList;
import org.apache.solr.common.SolrInputDocument;
import org.jnosql.diana.SettingsPriority;

import java.io.IOException;
import java.time.Duration;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;

import static java.util.stream.Collectors.toList;
Expand All @@ -59,9 +55,8 @@ public class SolrBDocumentCollectionManager implements DocumentCollectionManager
public DocumentEntity insert(DocumentEntity entity) {
Objects.requireNonNull(entity, "entity is required");

final SolrInputDocument document = getDocument(entity);
try {
solrClient.add(document);
solrClient.add(getDocument(entity));
} catch (SolrServerException | IOException e) {
throw new SolrException("Error to insert/update a information", e);
}
Expand Down

0 comments on commit a332d5e

Please sign in to comment.