Package com.browseengine.bobo.api

Examples of com.browseengine.bobo.api.BoboCustomSortField


    // no sel
    BrowseRequest br=new BrowseRequest();
      br.setCount(10);
      br.setOffset(0);
       
      br.setSort(new SortField[]{new BoboCustomSortField("custom",false,new CustomSortComparatorSource())});
      doTest(br,7,null,new String[]{"5","4","6","3","7","2","1"});
     
     
  }
View Full Code Here


    else if (SortField.FIELD_SCORE.equals(sf) || sf.getType() == SortField.SCORE){
      // we want to do reverse sorting regardless for relevance
      compSource = new ReverseDocComparatorSource(new RelevanceDocComparatorSource());
    }
    else if (sf instanceof BoboCustomSortField){
      BoboCustomSortField custField = (BoboCustomSortField)sf;
      DocComparatorSource src = custField.getCustomComparatorSource();
      assert src!=null;
      compSource = src;
    }
    else{
      Set<String> facetNames = browser.getFacetNames();
View Full Code Here

  private static SortField convert(Browsable browser,SortField sort){
    String field =sort.getField();
    FacetHandler<?> facetHandler = browser.getFacetHandler(field);
    if (facetHandler!=null){
      browser.getFacetHandler(field);
      BoboCustomSortField sortField = new BoboCustomSortField(field, sort.getReverse(), facetHandler.getDocComparatorSource());
      return sortField;
    }
    else{
      return sort;
    }
View Full Code Here

    // no sel
    BrowseRequest br = new BrowseRequest();
    br.setCount(10);
    br.setOffset(0);

    br.setSort(new SortField[] { new BoboCustomSortField("custom", false,
        new CustomSortComparatorSource()) });
    doTest(br, 7, null, new String[] { "5", "4", "6", "3", "7", "2", "1" });

  }
View Full Code Here

      compSource = new DocIdDocComparatorSource();
    } else if (SortField.FIELD_SCORE.equals(sf) || sf.getType() == SortField.Type.SCORE) {
      // we want to do reverse sorting regardless for relevance
      compSource = new ReverseDocComparatorSource(new RelevanceDocComparatorSource());
    } else if (sf instanceof BoboCustomSortField) {
      BoboCustomSortField custField = (BoboCustomSortField) sf;
      DocComparatorSource src = custField.getCustomComparatorSource();
      assert src != null;
      compSource = src;
    } else {
      Set<String> facetNames = browser.getFacetNames();
      String sortName = sf.getField();
View Full Code Here

  private static SortField convert(Browsable browser, SortField sort) {
    String field = sort.getField();
    FacetHandler<?> facetHandler = browser.getFacetHandler(field);
    if (facetHandler != null) {
      BoboCustomSortField sortField = new BoboCustomSortField(field, sort.getReverse(),
          facetHandler.getDocComparatorSource());
      return sortField;
    } else {
      return sort;
    }
View Full Code Here

    else if (SortField.FIELD_SCORE.equals(sf) || sf.getType() == SortField.SCORE){
      // we want to do reverse sorting regardless for relevance
      compSource = new ReverseDocComparatorSource(new RelevanceDocComparatorSource());
    }
    else if (sf instanceof BoboCustomSortField){
      BoboCustomSortField custField = (BoboCustomSortField)sf;
      DocComparatorSource src = custField.getCustomComparatorSource();
      assert src!=null;
      compSource = src;
    }
    else{
      Set<String> facetNames = browser.getFacetNames();
View Full Code Here

  private static SortField convert(Browsable browser,SortField sort){
    String field =sort.getField();
    FacetHandler<?> facetHandler = browser.getFacetHandler(field);
    if (facetHandler!=null){
      browser.getFacetHandler(field);
      BoboCustomSortField sortField = new BoboCustomSortField(field, sort.getReverse(), facetHandler.getDocComparatorSource());
      return sortField;
    }
    else{
      return sort;
    }
View Full Code Here

    else if (SortField.FIELD_SCORE.equals(sf) || sf.getType() == SortField.SCORE){
      // we want to do reverse sorting regardless for relevance
      compSource = new ReverseDocComparatorSource(new RelevanceDocComparatorSource());
    }
    else if (sf instanceof BoboCustomSortField){
      BoboCustomSortField custField = (BoboCustomSortField)sf;
      DocComparatorSource src = custField.getCustomComparatorSource();
      assert src!=null;
      compSource = src;
    }
    else{
      Set<String> facetNames = browser.getFacetNames();
View Full Code Here

  private static SortField convert(Browsable browser,SortField sort){
    String field =sort.getField();
    FacetHandler<?> facetHandler = browser.getFacetHandler(field);
    if (facetHandler!=null){
      browser.getFacetHandler(field);
      BoboCustomSortField sortField = new BoboCustomSortField(field, sort.getReverse(), facetHandler.getDocComparatorSource());
      return sortField;
    }
    else{
      return sort;
    }
View Full Code Here

TOP

Related Classes of com.browseengine.bobo.api.BoboCustomSortField

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.