Examples of DocValues


Examples of org.apache.solr.search.function.DocValues

  @Override
  public DocValues getValues(Map context, IndexReader reader) throws IOException {
    final int[] arr = (parser==null) ?
            cache.getInts(reader, field) :
            cache.getInts(reader, field, parser);
    return new DocValues() {
      @Override
      public float floatVal(int doc) {
        return (float)arr[doc];
      }
View Full Code Here

Examples of org.apache.solr.search.function.DocValues

      return field;
    }

    @Override
    public DocValues getValues(Map context, final IndexReader reader) throws IOException {
      return new DocValues() {
          private final int seed = getSeed(field, reader);
          @Override
          public float floatVal(int doc) {
            return (float)hash(doc+seed);
          }
View Full Code Here

Examples of org.apache.solr.search.function.DocValues

    vs.createWeight(context, sqr.getSearcher());
    SolrIndexReader sr = sqr.getSearcher().getReader();
    int idx = SolrIndexReader.readerIndex(doc, sr.getLeafOffsets());
    int base = sr.getLeafOffsets()[idx];
    SolrIndexReader sub = sr.getLeafReaders()[idx];
    DocValues vals = vs.getValues(context, sub);
    return vals.strVal(doc-base);
  }
View Full Code Here

Examples of org.apache.solr.search.function.DocValues

    vs.createWeight(context, sqr.getSearcher());
    SolrIndexReader sr = sqr.getSearcher().getReader();
    int idx = SolrIndexReader.readerIndex(doc, sr.getLeafOffsets());
    int base = sr.getLeafOffsets()[idx];
    SolrIndexReader sub = sr.getLeafReaders()[idx];
    DocValues vals = vs.getValues(context, sub);
    return vals.strVal(doc-base);
  }
View Full Code Here

Examples of org.apache.solr.search.function.DocValues

    final FieldCache.StringIndex index = cache.getStringIndex(reader, field);
    final int[] order = index.order;
    final String[] lookup = index.lookup;
    final float def = defVal;

    return new DocValues() {
      public float floatVal(int doc) {
        int ord=order[doc];
        return ord==0 ? def  : NumberUtils.SortableStr2float(lookup[ord]);
      }
View Full Code Here

Examples of org.apache.solr.search.function.DocValues

    final FieldCache.StringIndex index = cache.getStringIndex(reader, field);
    final int[] order = index.order;
    final String[] lookup = index.lookup;
    final long def = defVal;

    return new DocValues() {
      public float floatVal(int doc) {
        return (float)longVal(doc);
      }

      public int intVal(int doc) {
View Full Code Here

Examples of org.apache.solr.search.function.DocValues

    final FieldCache.StringIndex index = cache.getStringIndex(reader, field);
    final int[] order = index.order;
    final String[] lookup = index.lookup;
    final double def = defVal;

    return new DocValues() {
      public float floatVal(int doc) {
        return (float)doubleVal(doc);
      }

      public int intVal(int doc) {
View Full Code Here

Examples of org.apache.solr.search.function.DocValues

    final FieldCache.StringIndex index = cache.getStringIndex(reader, field);
    final int[] order = index.order;
    final String[] lookup = index.lookup;
    final int def = defVal;

    return new DocValues() {
      public float floatVal(int doc) {
        return (float)intVal(doc);
      }

      public int intVal(int doc) {
View Full Code Here

Examples of org.apache.solr.search.function.DocValues

      return field;
    }

    @Override
    public DocValues getValues(final IndexReader reader) throws IOException {
      return new DocValues() {
          private final int seed = getSeed(field, reader);
          @Override
          public float floatVal(int doc) {
            return (float)hash(doc+seed);
          }
View Full Code Here

Examples of org.apache.solr.search.function.DocValues

  public DocValues getValues(IndexReader reader) throws IOException {
    final int[] arr = (parser==null) ?
            cache.getInts(reader, field) :
            cache.getInts(reader, field, parser);
    return new DocValues() {
      public float floatVal(int doc) {
        return (float)arr[doc];
      }

      public int intVal(int doc) {
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.