Package org.apache.solr.search.function

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


  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() {
      public float floatVal(int doc) {
        return (float)arr[doc];
      }

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

    final FieldCache.StringIndex sindex = FieldCache.DEFAULT.getStringIndex(reader, field);

    final int arr[] = sindex.order;
    final int end = sindex.lookup.length;

    return new DocValues() {
      public float floatVal(int doc) {
        return (float)(end - arr[doc]);
      }

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

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

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

  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

    final FieldCache.StringIndex sindex = FieldCache.DEFAULT.getStringIndex(reader, field);

    final int arr[] = sindex.order;
    final int end = sindex.lookup.length;

    return new DocValues() {
      public float floatVal(int doc) {
        return (float)(end - arr[doc]);
      }

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

    return "ord(" + field + ')';
  }

  public DocValues getValues(IndexReader reader) throws IOException {
    final int[] arr = FieldCache.DEFAULT.getStringIndex(reader, field).order;
    return new DocValues() {
      public float floatVal(int doc) {
        return (float)arr[doc];
      }

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

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

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

    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

    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

TOP

Related Classes of org.apache.solr.search.function.DocValues

Copyright © 2018 www.massapicom. 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.