Examples of IntFieldSource


Examples of org.apache.lucene.queries.function.valuesource.IntFieldSource

      return ((Expression)o).getValueSource(this);
    }
    SortField field = (SortField) o;
    switch(field.getType()) {
      case INT:
        return new IntFieldSource(field.getField(), (IntParser) field.getParser());
      case LONG:
        return new LongFieldSource(field.getField(), (LongParser) field.getParser());
      case FLOAT:
        return new FloatFieldSource(field.getField(), (FloatParser) field.getParser());
      case DOUBLE:
View Full Code Here

Examples of org.apache.lucene.queries.function.valuesource.IntFieldSource

        )),
        new float[] { 1f, 1f });
  }
 
  public void testInt() throws Exception {
    assertHits(new FunctionQuery(new IntFieldSource("int")),
        new float[] { 35f, 54f });
  }
View Full Code Here

Examples of org.apache.lucene.queries.function.valuesource.IntFieldSource

        3, 1, 4)),
        new float[] { 0.1f, 0.1f });
  }
 
  public void testScale() throws Exception {
    assertHits(new FunctionQuery(new ScaleFloatFunction(new IntFieldSource("int"), 0, 1)),
       new float[] { 0.0f, 1.0f });
  }
View Full Code Here

Examples of org.apache.lucene.queries.function.valuesource.IntFieldSource

    IndexReader reader = writer.getReader();
    writer.close();
    IndexSearcher searcher = newSearcher(reader);

    // Get ValueSource from FieldCache
    IntFieldSource src = new IntFieldSource("value");
    // ...and make it a sort criterion
    SortField sf = src.getSortField(false).rewrite(searcher);
    Sort orderBy = new Sort(sf);

    // Get hits sorted by our FunctionValues (ascending values)
    Query q = new MatchAllDocsQuery();
    TopDocs hits = searcher.search(q, reader.maxDoc(), orderBy);
View Full Code Here

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

  }

  @Override
  public ValueSource getValueSource(SchemaField field, QParser qparser) {
    field.checkFieldCacheSource(qparser);
    return new IntFieldSource(field.name);
  }
View Full Code Here

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

  public SortField getSortField(SchemaField field,boolean reverse) {
    return new SortField(field.name,SortField.INT, reverse);
  }

  public ValueSource getValueSource(SchemaField field) {
    return new IntFieldSource(field.name);
  }
View Full Code Here

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

  public SortField getSortField(SchemaField field,boolean reverse) {
    return new SortField(field.name,SortField.INT, reverse);
  }

  public ValueSource getValueSource(SchemaField field) {
    return new IntFieldSource(field.name);
  }
View Full Code Here

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

    return new SortField(field.name,SortField.INT, reverse);
  }

  public ValueSource getValueSource(SchemaField field) {
    // todo - log warning
    return new IntFieldSource(field.name);
  }
View Full Code Here

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

  public SortField getSortField(SchemaField field,boolean reverse) {
    return new SortField(field.name,SortField.INT, reverse);
  }

  public ValueSource getValueSource(SchemaField field) {
    return new IntFieldSource(field.name);
  }
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.