Skip to content

Commit

Permalink
added fix for facet count
Browse files Browse the repository at this point in the history
  • Loading branch information
deepananbu committed Jun 12, 2024
1 parent c54622c commit 68bf966
Showing 1 changed file with 21 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
package uk.ac.ebi.spot.ols.controller.api.v1;

import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import javax.servlet.http.HttpServletResponse;

import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.impl.HttpSolrClient;
import org.apache.solr.client.solrj.response.FacetField;
import org.apache.solr.client.solrj.response.FacetField.Count;
import org.apache.solr.client.solrj.response.QueryResponse;
Expand All @@ -16,6 +26,11 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;

import uk.ac.ebi.spot.ols.repository.Validation;
import uk.ac.ebi.spot.ols.repository.solr.OlsSolrClient;
import uk.ac.ebi.spot.ols.repository.transforms.LocalizationTransform;
Expand All @@ -24,14 +39,6 @@
import uk.ac.ebi.spot.ols.repository.v1.V1OntologyRepository;
import uk.ac.ebi.spot.ols.repository.v1.mappers.AnnotationExtractor;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
* @author Simon Jupp
* @date 02/07/2015
Expand Down Expand Up @@ -298,8 +305,8 @@ public void search(

/*
* Fix: Start issue -
* https://github.com/ts4nfdi/terminology-service-suite/issues/51 Added
* facet_counts to responseObj
* https://github.com/EBISPOT/ols4/issues/613
* Added facet_counts to responseObj
*/
responseObj.put("facet_counts", facetCounts);
/*
Expand Down

0 comments on commit 68bf966

Please sign in to comment.