Examples of toInternal()


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

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

      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

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

          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

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

        }

        // 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

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

        // 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

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

        }
        */
        String key = line.substring(0, delimIndex);
        String val = line.substring(delimIndex+1, endIndex);

        String internalKey = idType.toInternal(key);
        float fval;
        try {
          fval=Float.parseFloat(val);
        } catch (Exception e) {
          if (++otherErrors<=10) {
View Full Code Here

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

      for (FieldFacetStats f : finfo) {
        Map<String, StatsValues> facetStatsValues = f.facetStatsValues;
        FieldType facetType = searcher.getSchema().getFieldType(f.name);
        for (Map.Entry<String,StatsValues> entry : facetStatsValues.entrySet()) {
          String termLabel = entry.getKey();
          int missingCount = searcher.numDocs(new TermQuery(new Term(f.name, facetType.toInternal(termLabel))), missing);
          entry.getValue().addMissing(missingCount);
        }
        allstats.facets.put(f.name, facetStatsValues);
      }
    }
View Full Code Here

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

        }
        */
        String key = line.substring(0, delimIndex);
        String val = line.substring(delimIndex+1, endIndex);

        String internalKey = idType.toInternal(key);
        float fval;
        try {
          fval=Float.parseFloat(val);
        } catch (Exception e) {
          if (++otherErrors<=10) {
View Full Code Here

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

          String field = StringHelper.intern(fields[j]);
          FieldType ft = raw ? null : rb.req.getSchema().getFieldTypeNoEx(field);
          if (ft==null) ft = new StrField();

          // If no lower bound was specified, use the prefix
          String lower = lowerStr==null ? prefix : (raw ? lowerStr : ft.toInternal(lowerStr));
          if (lower == null) lower="";
          String upper = upperStr==null ? null : (raw ? upperStr : ft.toInternal(upperStr));

          Term lowerTerm = new Term(field, lower);
          Term upperTerm = upper==null ? null : new Term(field, upper);
View Full Code Here

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

          if (ft==null) ft = new StrField();

          // If no lower bound was specified, use the prefix
          String lower = lowerStr==null ? prefix : (raw ? lowerStr : ft.toInternal(lowerStr));
          if (lower == null) lower="";
          String upper = upperStr==null ? null : (raw ? upperStr : ft.toInternal(upperStr));

          Term lowerTerm = new Term(field, lower);
          Term upperTerm = upper==null ? null : new Term(field, upper);
         
          TermEnum termEnum = rb.req.getSearcher().getReader().terms(lowerTerm); //this will be positioned ready to go
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.