Examples of indexedToReadable()


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

    for (int i = 0; i < tokens.length; i++) {
      AttributeSource token = tokens[i];
      final NamedList<Object> tokenNamedList = new SimpleOrderedMap<Object>();
      final String rawText = token.addAttribute(CharTermAttribute.class).toString();

      String text = fieldType.indexedToReadable(rawText);
      tokenNamedList.add("text", text);
      if (!text.equals(rawText)) {
        tokenNamedList.add("raw_text", rawText);
      }
View Full Code Here

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

            // This is a good term in the range.  Check if mincount/maxcount conditions are satisfied.
            int docFreq = termEnum.docFreq();
            if (docFreq >= freqmin && docFreq <= freqmax) {
              // add the term to the list
              String label = raw ? indexedText : ft.indexedToReadable(indexedText);
              if (sort) {
                queue.add(new CountPair<String, Integer>(label, docFreq));
              } else {
                fieldTerms.add(label, docFreq);
                i++;
View Full Code Here

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

          if (--off>=0) continue;
          if (--lim<0) break;
          int c = -(int)(p.longValue() >>> 32);
          //int tnum = 0x7fffffff - (int)p.longValue();  // use if priority queue
          int tnum = (int)p.longValue();
          String label = ft.indexedToReadable(getTermText(te, tnum));
          res.add(label, c);
        }
      } else {
        // add results in index order
        int i=startTerm;
View Full Code Here

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

        for (; i<endTerm; i++) {
          int c = doNegative ? maxTermCounts[i] - counts[i] : counts[i];
          if (c<mincount || --off>=0) continue;
          if (--lim<0) break;

          String label = ft.indexedToReadable(getTermText(te, i));
          res.add(label, c);
        }
      }

      te.close();
View Full Code Here

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

            // This is a good term in the range.  Check if mincount/maxcount conditions are satisfied.
            int docFreq = termEnum.docFreq();
            if (docFreq >= freqmin && docFreq <= freqmax) {
              // add the term to the list
              String label = raw ? indexedText : ft.indexedToReadable(indexedText);
              if (sort) {
                queue.add(new CountPair<String, Integer>(label, docFreq));
              } else {
                fieldTerms.add(label, docFreq);
                i++;
View Full Code Here

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

    FieldType fieldType = context.getFieldType();

    for (Token token : tokens) {
      NamedList<Object> tokenNamedList = new SimpleOrderedMap<Object>();

      String text = fieldType.indexedToReadable(token.term());
      tokenNamedList.add("text", text);
      if (!text.equals(token.term())) {
        tokenNamedList.add("raw_text", token.term());
      }
      tokenNamedList.add("type", token.type());
View Full Code Here

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

    int min=-1// the smallest value in the top 'N' values
    for (int i=1; i<count.length; i++) {
      int c = count[i];
      if (c==0 && !zeros) continue;
      if (limit<0) {
        res.add(ft.indexedToReadable(si.lookup[i]), c);
      } else if (c>min) {
        // NOTE: we use c>min rather than c>=min as an optimization because we are going in
        // index order, so we already know that the keys are ordered.  This can be very
        // important if a lot of the counts are repeated (like zero counts would be).
        queue.add(new CountPair<String,Integer>(ft.indexedToReadable(si.lookup[i]), c));
View Full Code Here

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

        res.add(ft.indexedToReadable(si.lookup[i]), c);
      } else if (c>min) {
        // NOTE: we use c>min rather than c>=min as an optimization because we are going in
        // index order, so we already know that the keys are ordered.  This can be very
        // important if a lot of the counts are repeated (like zero counts would be).
        queue.add(new CountPair<String,Integer>(ft.indexedToReadable(si.lookup[i]), c));
        if (queue.size()>=limit) min=queue.last().val;
      }
    }

    if (limit>=0) {
View Full Code Here

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

      }
    } while (te.next());

    NamedList res = new NamedList();
    for (CountPair<String,Integer> p : counts) {
      res.add(ft.indexedToReadable(p.key), p.val);
    }

    if (missing) {
      res.add(null, getFieldMissingCount(searcher,docs,field));
    }
View Full Code Here

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

        }
        // now select the right page from the results
        for (CountPair<String,Integer> p : queue) {
          if (--off>=0) continue;
          if (--lim<0) break;
          res.add(ft.indexedToReadable(p.key), p.val);
        }
      } else {
        // add results in index order
        int i=0;
        if (mincount<=0) {
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.