Class SolrQueryValidator

java.lang.Object
io.goobi.viewer.faces.validators.SolrQueryValidator
All Implemented Interfaces:
EventListener, javax.faces.validator.Validator<String>

public class SolrQueryValidator extends Object implements javax.faces.validator.Validator<String>
Validates the query syntax and displays the number of hits.
  • 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 interface javax.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