Skip to content

Commit

Permalink
Remove dead code.
Browse files Browse the repository at this point in the history
  • Loading branch information
mwoodiupui committed May 3, 2024
1 parent a341a73 commit b8ee9f8
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1136,32 +1136,6 @@ public QueryResponse query(String query, String filterQuery, String facetField,
return response;
}


/**
* String of IP and Ranges in IPTable as a Solr Query
*/
protected String filterQuery = null;

@Override
public String getIgnoreSpiderIPs() {
if (filterQuery == null) {
StringBuilder query = new StringBuilder();
boolean first = true;
for (String ip : SpiderDetector.getSpiderIpAddresses()) {
if (first) {
query.append(" AND ");
first = false;
}

query.append(" NOT(ip: ").append(ip).append(")");
}
filterQuery = query.toString();
}

return filterQuery;

}

@Override
public void shardSolrIndex() throws IOException, SolrServerException {
if (!(solr instanceof HttpSolrClient)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,13 +262,6 @@ public QueryResponse query(String query, String filterQuery,
int facetMinCount, boolean defaultFilterQueries)
throws SolrServerException, IOException;

/**
* Returns in a filterQuery string all the ip addresses that should be ignored
*
* @return a string query with ip addresses
*/
public String getIgnoreSpiderIPs();

public void shardSolrIndex() throws IOException, SolrServerException;

public void reindexBitstreamHits(boolean removeDeletedBitstreams) throws Exception;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,6 @@ public class SpiderDetector {
*/
private SpiderDetector() { }

/**
* Get an immutable Set representing all the Spider Addresses here
*
* @return a set of IP addresses as strings
*/
public static Set<String> getSpiderIpAddresses() {

spiderDetectorService.loadSpiderIpAddresses();
return spiderDetectorService.getTable().toSet();
}

/**
* Utility method which reads lines from a file & returns them in a Set.
*
Expand Down

0 comments on commit b8ee9f8

Please sign in to comment.