Examples of ASort


Examples of com.flaptor.hounder.searcher.sort.ASort

   */
  protected ASort generateSort(final Vector sortVec) {
    if (null == sortVec || 0 == sortVec.size()) {
      return null;
    } else {
      ASort lastSort = null;
      for (int i = sortVec.size() - 1 ; i >=  0; i--) {
        lastSort = generateSingleSort((Vector) sortVec.elementAt(i), lastSort);
      }
      return lastSort;
    }
View Full Code Here

Examples of com.flaptor.hounder.searcher.sort.ASort

  /**
   * Helper method for generateSort.
   */
  private ASort generateSingleSort(final Vector vec, final ASort subSort) {
    String name = (String) vec.elementAt(0);
    ASort sort;
    if (name.equals("SORT-BY-RELEVANCE")) {
      if (null == subSort) {
        sort = new ScoreSort();
      } else {
        sort = new ScoreSort(subSort);
View Full Code Here

Examples of com.flaptor.hounder.searcher.sort.ASort

                //ignore garbage
            }
        }

        // orderBy param
        ASort sort = null;
        String orderByParam = getParameter(params,"orderBy");
        if ((orderByParam != null) && !"".equals(orderByParam)) {
            String[] sortingCriteria = orderByParam.split(",");
            sort = new ScoreSort();
            for (int i = (sortingCriteria.length-1); i >= 0; i--) {
View Full Code Here

Examples of com.flaptor.hounder.searcher.sort.ASort

    }

    @TestInfo(testType = TestInfo.TestType.UNIT)
    public void testSortDocs() throws Exception {

        ASort sort = new FieldSort(false,"int",FieldSort.OrderType.INT);
        Vector<Pair<String,Vector<Document>>> docs = new Vector<Pair<String,Vector<Document>>>();
        Vector<Vector<Float>> scores = new Vector<Vector<Float>>();
        Vector<GroupedSearchResults> gsrs = new Vector<GroupedSearchResults>();

        for (int j = 0; j < 3 ; j++) {
View Full Code Here

Examples of com.flaptor.hounder.searcher.sort.ASort

                //ignore garbage
            }
        }

        // orderBy param
        ASort sort = null;
        String orderByParam = getParameter(params,"orderBy");
        if ((orderByParam != null) && !"".equals(orderByParam)) {
            String[] sortingCriteria = orderByParam.split(",");
            sort = new ScoreSort();
            for (int i = (sortingCriteria.length-1); i >= 0; i--) {
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.