Package org.apache.blur.thrift.generated

Examples of org.apache.blur.thrift.generated.SortFieldResult


    iterable.close();
  }

  private Entry<Double, List<SortFieldResult>> e(final double score, String s) {
    final List<SortFieldResult> sortFields = new ArrayList<SortFieldResult>();
    SortFieldResult sortField = new SortFieldResult();
    if (s == null) {
      sortField.setNullValue(true);
    } else {
      sortField.setStringValue(s);
    }
    sortFields.add(sortField);
    return new Entry<Double, List<SortFieldResult>>() {

      @Override
View Full Code Here


        List<SortFieldResult> sortFields2 = o2.getSortFieldResults();
        if (sortFields1.size() != sortFields2.size()) {
          throw new RuntimeException("SortFields must be the same size.");
        }
        for (int i = 0; i < sortFields1.size(); i++) {
          SortFieldResult sortField1 = sortFields1.get(i);
          SortFieldResult sortField2 = sortFields2.get(i);
          int compare = BlurUtil.SORT_FIELD_COMPARATOR.compare(sortField1, sortField2);
          if (compare != 0) {
            return compare;
          }
        }
View Full Code Here

      if (size1 != size2) {
        throw new RuntimeException("Result mismatch, sizes of sortfields must match [" + result1 + "] [" + result2
            + "]");
      }
      for (int i = 0; i < size1; i++) {
        SortFieldResult sortField1 = sortFields1.get(i);
        SortFieldResult sortField2 = sortFields2.get(i);
        int compare = BlurUtil.SORT_FIELD_COMPARATOR.compare(sortField1, sortField2);
        if (compare != 0) {
          return compare;
        }
      }
View Full Code Here

public class SortFieldComparator implements Comparator<SortFieldResult> {

  @Override
  public int compare(SortFieldResult o1, SortFieldResult o2) {
    _Fields field = o1.getSetField();
    int lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(field, o2.getSetField());
    if (lastComparison == 0) {
      Object obj1 = o1.getFieldValue();
      Object obj2 = o2.getFieldValue();
      switch (field) {
View Full Code Here

TOP

Related Classes of org.apache.blur.thrift.generated.SortFieldResult

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.