Package com.browseengine.bobo.api

Examples of com.browseengine.bobo.api.FacetSpec


    sel = new BrowseSelection("color");
    sel.addValue("red");
    br.addSelection(sel);

    FacetSpec charOutput = new FacetSpec();
    charOutput.setMaxCount(50);
    charOutput.setOrderBy(FacetSortSpec.OrderHitsDesc);

    br.setFacetSpec("char", charOutput);
    br.addSortField(new SortField("date", SortField.Type.CUSTOM, true));

    HashMap<String, List<BrowseFacet>> answer = new HashMap<String, List<BrowseFacet>>();
View Full Code Here


    BrowseSelection sel = new BrowseSelection("date");
    sel.addValue("[2001/01/01 TO 2005/01/01]");
    br.addSelection(sel);

    FacetSpec ospec = new FacetSpec();
    ospec.setExpandSelection(false);
    br.setFacetSpec("color", ospec);

    br.addSortField(new SortField("date", SortField.Type.CUSTOM, true));

    HashMap<String, List<BrowseFacet>> answer = new HashMap<String, List<BrowseFacet>>();
View Full Code Here

    BrowseSelection sel = new BrowseSelection("date");
    sel.addValue("[2005/01/01 TO *]");
    br.addSelection(sel);

    FacetSpec ospec = new FacetSpec();
    ospec.setExpandSelection(false);
    br.setFacetSpec("color", ospec);

    br.addSortField(new SortField("date", SortField.Type.CUSTOM, true));

    HashMap<String, List<BrowseFacet>> answer = new HashMap<String, List<BrowseFacet>>();
View Full Code Here

    BrowseSelection sel = new BrowseSelection("date");
    sel.addValue("[* TO 2002/01/01]");
    br.addSelection(sel);

    FacetSpec ospec = new FacetSpec();
    ospec.setExpandSelection(false);
    br.setFacetSpec("color", ospec);

    br.addSortField(new SortField("date", SortField.Type.CUSTOM, true));

    HashMap<String, List<BrowseFacet>> answer = new HashMap<String, List<BrowseFacet>>();
View Full Code Here

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

    FacetSpec colorSpec = new FacetSpec();
    colorSpec.setOrderBy(FacetSortSpec.OrderHitsDesc);
    br.setFacetSpec("color", colorSpec);

    FacetSpec shapeSpec = new FacetSpec();
    shapeSpec.setOrderBy(FacetSortSpec.OrderValueAsc);
    br.setFacetSpec("shape", shapeSpec);

    HashMap<String, List<BrowseFacet>> answer = new HashMap<String, List<BrowseFacet>>();
    answer.put(
      "color",
View Full Code Here

    BrowseSelection sel = new BrowseSelection("color");
    sel.addValue("red");
    br.addSelection(sel);

    FacetSpec ospec = new FacetSpec();
    ospec.setExpandSelection(false);
    br.setFacetSpec("color", ospec);

    HashMap<String, List<BrowseFacet>> answer = new HashMap<String, List<BrowseFacet>>();
    answer.put("color", Arrays.asList(new BrowseFacet[] { new BrowseFacet("red", 3) }));
View Full Code Here

    BrowseSelection sel = new BrowseSelection("date");
    sel.addValue("[* TO *]");
    br.addSelection(sel);

    FacetSpec ospec = new FacetSpec();
    ospec.setExpandSelection(false);
    br.setFacetSpec("color", ospec);

    br.addSortField(new SortField("date", SortField.Type.CUSTOM, false));

    doTest(br, 7, null, new String[] { "1", "3", "5", "2", "4", "7", "6" });
View Full Code Here

  public void testDefaultBrowse() {
    BrowseRequest br = new BrowseRequest();
    br.setCount(3);
    br.setOffset(0);

    FacetSpec spec = new FacetSpec();
    spec.setMaxCount(2);
    spec.setOrderBy(FacetSortSpec.OrderHitsDesc);
    br.setFacetSpec("color", spec);

    br.setSort(new SortField[] { new SortField("number", SortField.Type.CUSTOM, false) });

    HashMap<String, List<BrowseFacet>> answer = new HashMap<String, List<BrowseFacet>>();
View Full Code Here

    BrowseSelection sel = new BrowseSelection("shape");
    sel.addValue("square");
    br.addSelection(sel);

    FacetSpec spec = new FacetSpec();
    spec.setMinHitCount(0);
    spec.setOrderBy(FacetSortSpec.OrderHitsDesc);
    br.setFacetSpec("color", spec);

    HashMap<String, List<BrowseFacet>> answer = new HashMap<String, List<BrowseFacet>>();
    answer.put(
      "color",
View Full Code Here

  public void testRandomAccessFacet() throws Exception {
    BrowseRequest br = new BrowseRequest();
    br.setCount(10);
    br.setOffset(0);
    br.setFacetSpec("number", new FacetSpec());

    BoboBrowser browser = newBrowser();

    BrowseResult res = browser.browse(br);
    FacetAccessible facetAccessor = res.getFacetAccessor("number");
View Full Code Here

TOP

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

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.