Java 类org.apache.lucene.util.mutable.MutableValueFloat 实例源码

项目:search    文件:FloatDocValues.java   
@Override
public ValueFiller getValueFiller() {
  return new ValueFiller() {
    private final MutableValueFloat mval = new MutableValueFloat();

    @Override
    public MutableValue getValue() {
      return mval;
    }

    @Override
    public void fillValue(int doc) {
      mval.value = floatVal(doc);
      mval.exists = exists(doc);
    }
  };
}
项目:search    文件:FunctionValues.java   
/** @lucene.experimental  */
public ValueFiller getValueFiller() {
  return new ValueFiller() {
    private final MutableValueFloat mval = new MutableValueFloat();

    @Override
    public MutableValue getValue() {
      return mval;
    }

    @Override
    public void fillValue(int doc) {
      mval.value = floatVal(doc);
    }
  };
}
项目:NYBC    文件:FloatDocValues.java   
@Override
public ValueFiller getValueFiller() {
  return new ValueFiller() {
    private final MutableValueFloat mval = new MutableValueFloat();

    @Override
    public MutableValue getValue() {
      return mval;
    }

    @Override
    public void fillValue(int doc) {
      mval.value = floatVal(doc);
      mval.exists = exists(doc);
    }
  };
}
项目:NYBC    文件:FunctionValues.java   
/** @lucene.experimental  */
public ValueFiller getValueFiller() {
  return new ValueFiller() {
    private final MutableValueFloat mval = new MutableValueFloat();

    @Override
    public MutableValue getValue() {
      return mval;
    }

    @Override
    public void fillValue(int doc) {
      mval.value = floatVal(doc);
    }
  };
}
项目:read-open-source-code    文件:FloatDocValues.java   
@Override
public ValueFiller getValueFiller() {
  return new ValueFiller() {
    private final MutableValueFloat mval = new MutableValueFloat();

    @Override
    public MutableValue getValue() {
      return mval;
    }

    @Override
    public void fillValue(int doc) {
      mval.value = floatVal(doc);
      mval.exists = exists(doc);
    }
  };
}
项目:read-open-source-code    文件:FunctionValues.java   
/** @lucene.experimental  */
public ValueFiller getValueFiller() {
  return new ValueFiller() {
    private final MutableValueFloat mval = new MutableValueFloat();

    @Override
    public MutableValue getValue() {
      return mval;
    }

    @Override
    public void fillValue(int doc) {
      mval.value = floatVal(doc);
    }
  };
}
项目:read-open-source-code    文件:FloatDocValues.java   
@Override
public ValueFiller getValueFiller() {
  return new ValueFiller() {
    private final MutableValueFloat mval = new MutableValueFloat();

    @Override
    public MutableValue getValue() {
      return mval;
    }

    @Override
    public void fillValue(int doc) {
      mval.value = floatVal(doc);
      mval.exists = exists(doc);
    }
  };
}
项目:read-open-source-code    文件:FunctionValues.java   
/** @lucene.experimental  */
public ValueFiller getValueFiller() {
  return new ValueFiller() {
    private final MutableValueFloat mval = new MutableValueFloat();

    @Override
    public MutableValue getValue() {
      return mval;
    }

    @Override
    public void fillValue(int doc) {
      mval.value = floatVal(doc);
    }
  };
}
项目:read-open-source-code    文件:FloatDocValues.java   
@Override
public ValueFiller getValueFiller() {
  return new ValueFiller() {
    private final MutableValueFloat mval = new MutableValueFloat();

    @Override
    public MutableValue getValue() {
      return mval;
    }

    @Override
    public void fillValue(int doc) {
      mval.value = floatVal(doc);
      mval.exists = exists(doc);
    }
  };
}
项目:read-open-source-code    文件:FunctionValues.java   
/** @lucene.experimental  */
public ValueFiller getValueFiller() {
  return new ValueFiller() {
    private final MutableValueFloat mval = new MutableValueFloat();

    @Override
    public MutableValue getValue() {
      return mval;
    }

    @Override
    public void fillValue(int doc) {
      mval.value = floatVal(doc);
    }
  };
}
项目:Maskana-Gestor-de-Conocimiento    文件:FloatDocValues.java   
@Override
public ValueFiller getValueFiller() {
  return new ValueFiller() {
    private final MutableValueFloat mval = new MutableValueFloat();

    @Override
    public MutableValue getValue() {
      return mval;
    }

    @Override
    public void fillValue(int doc) {
      mval.value = floatVal(doc);
      mval.exists = exists(doc);
    }
  };
}
项目:Maskana-Gestor-de-Conocimiento    文件:FunctionValues.java   
/** @lucene.experimental  */
public ValueFiller getValueFiller() {
  return new ValueFiller() {
    private final MutableValueFloat mval = new MutableValueFloat();

    @Override
    public MutableValue getValue() {
      return mval;
    }

    @Override
    public void fillValue(int doc) {
      mval.value = floatVal(doc);
    }
  };
}
项目:search    文件:QueryValueSource.java   
@Override
public ValueFiller getValueFiller() {
  //
  // TODO: if we want to support more than one value-filler or a value-filler in conjunction with
  // the FunctionValues, then members like "scorer" should be per ValueFiller instance.
  // Or we can say that the user should just instantiate multiple FunctionValues.
  //
  return new ValueFiller() {
    private final MutableValueFloat mval = new MutableValueFloat();

    @Override
    public MutableValue getValue() {
      return mval;
    }

    @Override
    public void fillValue(int doc) {
      try {
        if (noMatches) {
          mval.value = defVal;
          mval.exists = false;
          return;
        }
        scorer = weight.scorer(readerContext, acceptDocs);
        scorerDoc = -1;
        if (scorer==null) {
          noMatches = true;
          mval.value = defVal;
          mval.exists = false;
          return;
        }
        lastDocRequested = doc;

        if (scorerDoc < doc) {
          scorerDoc = scorer.advance(doc);
        }

        if (scorerDoc > doc) {
          // query doesn't match this document... either because we hit the
          // end, or because the next doc is after this doc.
          mval.value = defVal;
          mval.exists = false;
          return;
        }

        // a match!
        mval.value = scorer.score();
        mval.exists = true;
      } catch (IOException e) {
        throw new RuntimeException("caught exception in QueryDocVals("+q+") doc="+doc, e);
      }
    }
  };
}
项目:NYBC    文件:QueryValueSource.java   
@Override
public ValueFiller getValueFiller() {
  //
  // TODO: if we want to support more than one value-filler or a value-filler in conjunction with
  // the FunctionValues, then members like "scorer" should be per ValueFiller instance.
  // Or we can say that the user should just instantiate multiple FunctionValues.
  //
  return new ValueFiller() {
    private final MutableValueFloat mval = new MutableValueFloat();

    @Override
    public MutableValue getValue() {
      return mval;
    }

    @Override
    public void fillValue(int doc) {
      try {
        if (noMatches) {
          mval.value = defVal;
          mval.exists = false;
          return;
        }
        scorer = weight.scorer(readerContext, true, false, acceptDocs);
        scorerDoc = -1;
        if (scorer==null) {
          noMatches = true;
          mval.value = defVal;
          mval.exists = false;
          return;
        }
        lastDocRequested = doc;

        if (scorerDoc < doc) {
          scorerDoc = scorer.advance(doc);
        }

        if (scorerDoc > doc) {
          // query doesn't match this document... either because we hit the
          // end, or because the next doc is after this doc.
          mval.value = defVal;
          mval.exists = false;
          return;
        }

        // a match!
        mval.value = scorer.score();
        mval.exists = true;
      } catch (IOException e) {
        throw new RuntimeException("caught exception in QueryDocVals("+q+") doc="+doc, e);
      }
    }
  };
}
项目:read-open-source-code    文件:QueryValueSource.java   
@Override
public ValueFiller getValueFiller() {
  //
  // TODO: if we want to support more than one value-filler or a value-filler in conjunction with
  // the FunctionValues, then members like "scorer" should be per ValueFiller instance.
  // Or we can say that the user should just instantiate multiple FunctionValues.
  //
  return new ValueFiller() {
    private final MutableValueFloat mval = new MutableValueFloat();

    @Override
    public MutableValue getValue() {
      return mval;
    }

    @Override
    public void fillValue(int doc) {
      try {
        if (noMatches) {
          mval.value = defVal;
          mval.exists = false;
          return;
        }
        scorer = weight.scorer(readerContext, true, false, acceptDocs);
        scorerDoc = -1;
        if (scorer==null) {
          noMatches = true;
          mval.value = defVal;
          mval.exists = false;
          return;
        }
        lastDocRequested = doc;

        if (scorerDoc < doc) {
          scorerDoc = scorer.advance(doc);
        }

        if (scorerDoc > doc) {
          // query doesn't match this document... either because we hit the
          // end, or because the next doc is after this doc.
          mval.value = defVal;
          mval.exists = false;
          return;
        }

        // a match!
        mval.value = scorer.score();
        mval.exists = true;
      } catch (IOException e) {
        throw new RuntimeException("caught exception in QueryDocVals("+q+") doc="+doc, e);
      }
    }
  };
}
项目:read-open-source-code    文件:QueryValueSource.java   
@Override
public ValueFiller getValueFiller() {
  //
  // TODO: if we want to support more than one value-filler or a value-filler in conjunction with
  // the FunctionValues, then members like "scorer" should be per ValueFiller instance.
  // Or we can say that the user should just instantiate multiple FunctionValues.
  //
  return new ValueFiller() {
    private final MutableValueFloat mval = new MutableValueFloat();

    @Override
    public MutableValue getValue() {
      return mval;
    }

    @Override
    public void fillValue(int doc) {
      try {
        if (noMatches) {
          mval.value = defVal;
          mval.exists = false;
          return;
        }
        scorer = weight.scorer(readerContext, true, false, acceptDocs);
        scorerDoc = -1;
        if (scorer==null) {
          noMatches = true;
          mval.value = defVal;
          mval.exists = false;
          return;
        }
        lastDocRequested = doc;

        if (scorerDoc < doc) {
          scorerDoc = scorer.advance(doc);
        }

        if (scorerDoc > doc) {
          // query doesn't match this document... either because we hit the
          // end, or because the next doc is after this doc.
          mval.value = defVal;
          mval.exists = false;
          return;
        }

        // a match!
        mval.value = scorer.score();
        mval.exists = true;
      } catch (IOException e) {
        throw new RuntimeException("caught exception in QueryDocVals("+q+") doc="+doc, e);
      }
    }
  };
}
项目:read-open-source-code    文件:QueryValueSource.java   
@Override
public ValueFiller getValueFiller() {
  //
  // TODO: if we want to support more than one value-filler or a value-filler in conjunction with
  // the FunctionValues, then members like "scorer" should be per ValueFiller instance.
  // Or we can say that the user should just instantiate multiple FunctionValues.
  //
  return new ValueFiller() {
    private final MutableValueFloat mval = new MutableValueFloat();

    @Override
    public MutableValue getValue() {
      return mval;
    }

    @Override
    public void fillValue(int doc) {
      try {
        if (noMatches) {
          mval.value = defVal;
          mval.exists = false;
          return;
        }
        scorer = weight.scorer(readerContext, acceptDocs);
        scorerDoc = -1;
        if (scorer==null) {
          noMatches = true;
          mval.value = defVal;
          mval.exists = false;
          return;
        }
        lastDocRequested = doc;

        if (scorerDoc < doc) {
          scorerDoc = scorer.advance(doc);
        }

        if (scorerDoc > doc) {
          // query doesn't match this document... either because we hit the
          // end, or because the next doc is after this doc.
          mval.value = defVal;
          mval.exists = false;
          return;
        }

        // a match!
        mval.value = scorer.score();
        mval.exists = true;
      } catch (IOException e) {
        throw new RuntimeException("caught exception in QueryDocVals("+q+") doc="+doc, e);
      }
    }
  };
}
项目:Maskana-Gestor-de-Conocimiento    文件:QueryValueSource.java   
@Override
public ValueFiller getValueFiller() {
  //
  // TODO: if we want to support more than one value-filler or a value-filler in conjunction with
  // the FunctionValues, then members like "scorer" should be per ValueFiller instance.
  // Or we can say that the user should just instantiate multiple FunctionValues.
  //
  return new ValueFiller() {
    private final MutableValueFloat mval = new MutableValueFloat();

    @Override
    public MutableValue getValue() {
      return mval;
    }

    @Override
    public void fillValue(int doc) {
      try {
        if (noMatches) {
          mval.value = defVal;
          mval.exists = false;
          return;
        }
        scorer = weight.scorer(readerContext, true, false, acceptDocs);
        scorerDoc = -1;
        if (scorer==null) {
          noMatches = true;
          mval.value = defVal;
          mval.exists = false;
          return;
        }
        lastDocRequested = doc;

        if (scorerDoc < doc) {
          scorerDoc = scorer.advance(doc);
        }

        if (scorerDoc > doc) {
          // query doesn't match this document... either because we hit the
          // end, or because the next doc is after this doc.
          mval.value = defVal;
          mval.exists = false;
          return;
        }

        // a match!
        mval.value = scorer.score();
        mval.exists = true;
      } catch (IOException e) {
        throw new RuntimeException("caught exception in QueryDocVals("+q+") doc="+doc, e);
      }
    }
  };
}