Package io.goobi.viewer.faces.validators
Class SolrQueryValidator
java.lang.Object
io.goobi.viewer.faces.validators.SolrQueryValidator
- All Implemented Interfaces:
EventListener
,javax.faces.validator.Validator<String>
Validates the query syntax and displays the number of hits.
-
Field Summary
Fields inherited from interface javax.faces.validator.Validator
NOT_IN_RANGE_MESSAGE_ID
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
SolrQueryValidator
public SolrQueryValidator()
-
-
Method Details
-
validate
public void validate(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String value) throws javax.faces.validator.ValidatorException - Specified by:
validate
in interfacejavax.faces.validator.Validator<String>
- Throws:
javax.faces.validator.ValidatorException
-
getHitCount
public static long getHitCount(String query) throws org.apache.solr.client.solrj.SolrServerException, IOException - Parameters:
query
-- Returns:
- Hit count
- Throws:
org.apache.solr.client.solrj.SolrServerException
IOException
-