Package org.apache.solr.schema

Examples of org.apache.solr.schema.DateField.toInternal()


        hasField = true;
       
        // TODO!!! HACK -- date conversion
        if( sfield != null && v instanceof Date && sfield.getType() instanceof DateField ) {
          DateField df = (DateField)sfield.getType();
          val = df.toInternal( (Date)v )+'Z';
        }
        else if (v != null) {
          val = v.toString();
        }
       
View Full Code Here


      try {
       
        Date low = start;
        while (low.before(end)) {
          dmp.setNow(low);
          final String lowI = ft.toInternal(low);
          final String label = ft.indexedToReadable(lowI);
          Date high = dmp.parseMath(gap);
          if (end.before(high)) {
            if (params.getFieldBool(f,FacetParams.FACET_DATE_HARD_END,false)) {
              high = end;
View Full Code Here

          if (high.before(low)) {
            throw new SolrException
              (SolrException.ErrorCode.BAD_REQUEST,
               "date facet infinite loop (is gap negative?)");
          }
          final String highI = ft.toInternal(high);
          resInner.add(label, rangeCount(f,lowI,highI,true,true));
          low = high;
        }
      } catch (java.text.ParseException e) {
        throw new SolrException
View Full Code Here

        }

        // no matter what other values are listed, we don't do
        // anything if "none" is specified.
        if (! others.contains(FacetDateOther.NONE) ) {
          final String startI = ft.toInternal(start);
          final String endI = ft.toInternal(end);
         
          boolean all = others.contains(FacetDateOther.ALL);
       
          if (all || others.contains(FacetDateOther.BEFORE)) {
View Full Code Here

        // no matter what other values are listed, we don't do
        // anything if "none" is specified.
        if (! others.contains(FacetDateOther.NONE) ) {
          final String startI = ft.toInternal(start);
          final String endI = ft.toInternal(end);
         
          boolean all = others.contains(FacetDateOther.ALL);
       
          if (all || others.contains(FacetDateOther.BEFORE)) {
            resInner.add(FacetDateOther.BEFORE.toString(),
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.