Package org.apache.blur.thrift.generated

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


    List<SortField> sortFields = new ArrayList<SortField>();
    for (Option option : options) {
      if (option.getOpt().equals(SORT)) {
        List<String> valuesList = option.getValuesList();
        if (valuesList.size() == 2) {
          sortFields.add(new SortField(valuesList.get(0), valuesList.get(1), false));
        } else if (valuesList.size() == 3) {
          sortFields.add(new SortField(valuesList.get(0), valuesList.get(1), Boolean.parseBoolean(valuesList.get(2))));
        } else {
          throw new RuntimeException("Sort take 2 or 3 parameters.");
        }
      }
    }
View Full Code Here


    BlurQuery blurQueryRow = new BlurQuery();
    Query queryRow = new Query();
    queryRow.setQuery("test.test:value");
    queryRow.setRowQuery(false);
    blurQueryRow.setQuery(queryRow);
    blurQueryRow.addToSortFields(new SortField("test", "facet", false));

    blurQueryRow.setUseCacheIfPresent(false);
    blurQueryRow.setCacheResult(false);
    Selector selector = new Selector();
    selector.setRecordOnly(true);
View Full Code Here

TOP

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

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.