|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.statistics.SolrLogger
public class SolrLogger
Static holder for a HttpSolrClient connection pool to issue usage logging events to Solr from DSpace libraries, and some static query composers.
| Nested Class Summary | |
|---|---|
static class |
SolrLogger.ResultProcessor
|
static class |
SolrLogger.StatisticsType
|
| Field Summary | |
|---|---|
static String |
DATE_FORMAT_8601
|
static String |
DATE_FORMAT_DCDATE
|
| Constructor Summary | |
|---|---|
SolrLogger()
|
|
| Method Summary | |
|---|---|
static void |
deleteIP(String ip)
|
static void |
deleteRobotsByIP()
|
static void |
deleteRobotsByIsBotFlag()
|
static String |
getIgnoreSpiderIPs()
Returns in a filterQuery string all the ip addresses that should be ignored |
static Map<String,String> |
getMetadataStorageInfo()
|
static boolean |
isUseProxies()
|
static void |
markRobotByUserAgent(String agent)
|
static void |
markRobotsByIP()
|
static void |
optimizeSOLR()
Maintenance to keep a SOLR index efficient. |
static void |
post(DSpaceObject dspaceObject,
javax.servlet.http.HttpServletRequest request,
EPerson currentUser)
Deprecated. |
static void |
postSearch(DSpaceObject resultObject,
javax.servlet.http.HttpServletRequest request,
EPerson currentUser,
List<String> queries,
int rpp,
String sortBy,
String order,
int page,
DSpaceObject scope)
|
static void |
postView(DSpaceObject dspaceObject,
javax.servlet.http.HttpServletRequest request,
EPerson currentUser)
Store a usage event into Solr. |
static void |
postWorkflow(UsageWorkflowEvent usageWorkflowEvent)
|
static void |
query(String query,
int max)
|
static org.apache.solr.client.solrj.response.QueryResponse |
query(String query,
String filterQuery,
String facetField,
int rows,
int max,
String dateType,
String dateStart,
String dateEnd,
List<String> facetQueries,
String sort,
boolean ascending)
|
static ObjectCount[] |
queryFacetDate(String query,
String filterQuery,
int max,
String dateType,
String dateStart,
String dateEnd,
boolean showTotal)
Query used to get values grouped by the date. |
static ObjectCount[] |
queryFacetField(String query,
String filterQuery,
String facetField,
int max,
boolean showTotal,
List<String> facetQueries)
Query used to get values grouped by the given facet field. |
static Map<String,Integer> |
queryFacetQuery(String query,
String filterQuery,
List<String> facetQueries)
|
static Map<String,List<String>> |
queryField(String query,
List oldFieldVals,
String field)
|
static ObjectCount |
queryTotal(String query,
String filterQuery)
|
static void |
reindexBitstreamHits(boolean removeDeletedBitstreams)
|
static void |
removeIndex(String query)
Delete data from the index, as described by a query. |
static void |
shardSolrIndex()
|
static void |
storeParents(org.apache.solr.common.SolrInputDocument doc1,
DSpaceObject dso)
Method just used to log the parents. |
static void |
update(String query,
String action,
List<String> fieldNames,
List<List<Object>> fieldValuesList)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DATE_FORMAT_8601
public static final String DATE_FORMAT_DCDATE
| Constructor Detail |
|---|
public SolrLogger()
| Method Detail |
|---|
public static void post(DSpaceObject dspaceObject,
javax.servlet.http.HttpServletRequest request,
EPerson currentUser)
dspaceObject - the object used.request - the current request context.currentUser - the current session's user.
public static void postView(DSpaceObject dspaceObject,
javax.servlet.http.HttpServletRequest request,
EPerson currentUser)
dspaceObject - the object used.request - the current request context.currentUser - the current session's user.
public static void postSearch(DSpaceObject resultObject,
javax.servlet.http.HttpServletRequest request,
EPerson currentUser,
List<String> queries,
int rpp,
String sortBy,
String order,
int page,
DSpaceObject scope)
public static void postWorkflow(UsageWorkflowEvent usageWorkflowEvent)
throws SQLException
SQLExceptionpublic static Map<String,String> getMetadataStorageInfo()
public static void storeParents(org.apache.solr.common.SolrInputDocument doc1,
DSpaceObject dso)
throws SQLException
doc1 - the current SolrInputDocumentdso - the current dspace object we want to log
SQLException - ignore itpublic static boolean isUseProxies()
public static void removeIndex(String query)
throws IOException,
org.apache.solr.client.solrj.SolrServerException
query - description of the records to be deleted.
IOException
org.apache.solr.client.solrj.SolrServerException
public static Map<String,List<String>> queryField(String query,
List oldFieldVals,
String field)
public static void markRobotsByIP()
public static void markRobotByUserAgent(String agent)
public static void deleteRobotsByIsBotFlag()
public static void deleteIP(String ip)
public static void deleteRobotsByIP()
public static void update(String query,
String action,
List<String> fieldNames,
List<List<Object>> fieldValuesList)
throws org.apache.solr.client.solrj.SolrServerException,
IOException
org.apache.solr.client.solrj.SolrServerException
IOException
public static void query(String query,
int max)
throws org.apache.solr.client.solrj.SolrServerException
org.apache.solr.client.solrj.SolrServerException
public static ObjectCount[] queryFacetField(String query,
String filterQuery,
String facetField,
int max,
boolean showTotal,
List<String> facetQueries)
throws org.apache.solr.client.solrj.SolrServerException
query - the query to be usedfacetField - the facet field on which to group our valuesmax - the max number of values given back (in case of 10 the top 10
will be given)showTotal - a boolean determining whether the total amount should be given
back as the last element of the array
org.apache.solr.client.solrj.SolrServerException - ...
public static ObjectCount[] queryFacetDate(String query,
String filterQuery,
int max,
String dateType,
String dateStart,
String dateEnd,
boolean showTotal)
throws org.apache.solr.client.solrj.SolrServerException
query - the query to be usedmax - the max number of values given back (in case of 10 the top 10
will be given)dateType - the type to be used (example: DAY, MONTH, YEAR)dateStart - the start date Format:(-3, -2, ..) the date is calculated
relatively on todaydateEnd - the end date stop Format (-2, +1, ..) the date is calculated
relatively on todayshowTotal - a boolean determining whether the total amount should be given
back as the last element of the array
org.apache.solr.client.solrj.SolrServerException - ...
public static Map<String,Integer> queryFacetQuery(String query,
String filterQuery,
List<String> facetQueries)
throws org.apache.solr.client.solrj.SolrServerException
org.apache.solr.client.solrj.SolrServerException
public static ObjectCount queryTotal(String query,
String filterQuery)
throws org.apache.solr.client.solrj.SolrServerException
org.apache.solr.client.solrj.SolrServerException
public static org.apache.solr.client.solrj.response.QueryResponse query(String query,
String filterQuery,
String facetField,
int rows,
int max,
String dateType,
String dateStart,
String dateEnd,
List<String> facetQueries,
String sort,
boolean ascending)
throws org.apache.solr.client.solrj.SolrServerException
org.apache.solr.client.solrj.SolrServerExceptionpublic static String getIgnoreSpiderIPs()
public static void optimizeSOLR()
public static void shardSolrIndex()
throws IOException,
org.apache.solr.client.solrj.SolrServerException
IOException
org.apache.solr.client.solrj.SolrServerException
public static void reindexBitstreamHits(boolean removeDeletedBitstreams)
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||