Skip to content

Commit

Permalink
Format clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
oblodgett committed Jan 26, 2025
1 parent ac16046 commit a61c1f7
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 149 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void index() {
log.info("Pulling All Terms Finished");

Iterable<SearchableItemDocument> docs = goTrans.translateEntities(terms);
for(SearchableItemDocument doc: docs) {
for (SearchableItemDocument doc : docs) {
doc.setPopularity(popularityScore.get(doc.getPrimaryKey()));
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.alliancegenome.indexer.indexers;


import java.io.IOException;
import java.net.URL;
import java.nio.file.Files;
Expand Down Expand Up @@ -41,7 +40,6 @@

import lombok.extern.slf4j.Slf4j;


@Slf4j
public abstract class Indexer extends Thread {

Expand Down Expand Up @@ -99,7 +97,9 @@ public void afterBulk(long executionId, BulkRequest request, Throwable failure)
builder.setConcurrentRequests(indexerConfig.getConcurrentRequests());
builder.setBackoffPolicy(BackoffPolicy.exponentialBackoff(TimeValue.timeValueSeconds(1L), 60));
bulkProcessor = builder.build();
//bulkProcessor = BulkProcessor.builder((request, bulkListener) -> searchClient.bulkAsync(request, RequestOptions.DEFAULT, bulkListener), listener).build();
// bulkProcessor = BulkProcessor.builder((request, bulkListener) ->
// searchClient.bulkAsync(request, RequestOptions.DEFAULT, bulkListener),
// listener).build();

}

Expand Down Expand Up @@ -168,7 +168,7 @@ public <D extends ESDocument> void indexDocuments(Iterable<D> docs, Class<?> vie
} else {
json = om.writeValueAsString(doc);
}
if(json.length() > 19_000_000) {
if (json.length() > 19_000_000) {
log.warn("Document is too large for ES skipping: " + json.length());
continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@
import jakarta.ws.rs.QueryParam;

@Path("/vocabularyterm")
@Produces({"application/json"})
@Consumes({"application/json"})
@Produces({ "application/json" })
@Consumes({ "application/json" })
public interface VocabularyRESTInterface {

@POST
@Path("/find")
@JsonView({View.FieldsAndLists.class})
SearchResponse<VocabularyTerm> find(
@DefaultValue("0") @QueryParam("page") Integer page,
@DefaultValue("10") @QueryParam("limit") Integer limit,
HashMap<String, Object> params);
@JsonView({ View.FieldsAndLists.class })
SearchResponse<VocabularyTerm> find(@DefaultValue("0") @QueryParam("page") Integer page, @DefaultValue("10") @QueryParam("limit") Integer limit, HashMap<String, Object> params);

}
Loading

0 comments on commit a61c1f7

Please sign in to comment.