Package com.browseengine.bobo.facets.impl

Examples of com.browseengine.bobo.facets.impl.MultiValueFacetHandler


//    }
//    words = wordlist.toArray(new String[1]);
    System.out.println("load the words " + words.length);

    final Collection<FacetHandler<?>> facetHandlers = new ArrayList<FacetHandler<?>>();
    facetHandlers.add(new MultiValueFacetHandler("ccid", new PredefinedTermListFactory<Integer>(Integer.class,"0000000000")));
//    facetHandlers.add(new MultiValueFacetHandler("pcid", new PredefinedTermListFactory<Integer>(Integer.class,"0000000000")));
    facetHandlers.add(new SimpleFacetHandler("industry", new PredefinedTermListFactory<Integer>(Integer.class,"0000000000")));
    facetHandlers.add(new SimpleFacetHandler("geo_region"));
    facetHandlers.add(new MultiValueFacetHandler("education_id", new PredefinedTermListFactory<Integer>(Integer.class,"0000000000")));
    long tgetinstance = System.currentTimeMillis();
    final BoboIndexReader boboReader = BoboIndexReader.getInstance(reader, facetHandlers , null);
    System.out.println("getInstanceTime: " + (System.currentTimeMillis() - tgetinstance));
//warming
    for(int x=0; x<30; x++)
View Full Code Here


   

    facetHandlers.add(new SimpleFacetHandler("name"));
    facetHandlers.add(new RangeFacetHandler("date", new PredefinedTermListFactory(Date.class, "yyyy/MM/dd"), Arrays.asList(new String[]{"[2000/01/01 TO 2003/05/05]", "[2003/05/06 TO 2005/04/04]"})));
    facetHandlers.add(new SimpleFacetHandler("char", (TermListFactory)null));
    facetHandlers.add(new MultiValueFacetHandler("tag", (String)null, (TermListFactory)null, tagSizePayloadTerm));
    facetHandlers.add(new MultiValueFacetHandler("multinum", new PredefinedTermListFactory(Integer.class, "000")));
    facetHandlers.add(new CompactMultiValueFacetHandler("compactnum", new PredefinedTermListFactory(Integer.class, "000")));
    facetHandlers.add(new SimpleFacetHandler("storenum", new PredefinedTermListFactory(Long.class, null)));
    /* New FacetHandler for geographic locations. Depends on two RangeFacetHandlers on latitude and longitude */
    facetHandlers.add(new RangeFacetHandler("latitude", Arrays.asList(new String[]{"[* TO 30]", "[35 TO 60]", "[70 TO 120]"})));
    facetHandlers.add(new RangeFacetHandler("longitude", Arrays.asList(new String[]{"[* TO 30]", "[35 TO 60]", "[70 TO 120]"})));
View Full Code Here

    facetHandlers.add(new SimpleFacetHandler("name"));
    facetHandlers.add(new RangeFacetHandler("date", new PredefinedTermListFactory(Date.class,
        "yyyy/MM/dd"), Arrays.asList(new String[] { "[2000/01/01 TO 2003/05/05]",
        "[2003/05/06 TO 2005/04/04]" })));
    facetHandlers.add(new SimpleFacetHandler("char", (TermListFactory) null));
    facetHandlers.add(new MultiValueFacetHandler("tag", (String) null, (TermListFactory) null,
        tagSizePayloadTerm));
    facetHandlers.add(new MultiValueFacetHandler("multinum", new PredefinedTermListFactory(
        Integer.class, "000")));
    facetHandlers.add(new MultiValueFacetHandler("diffname", "multinum",
        new PredefinedTermListFactory(Integer.class, "000")));
    facetHandlers.add(new MultiValueWithWeightFacetHandler("multiwithweight"));
    facetHandlers.add(new CompactMultiValueFacetHandler("compactnum",
        new PredefinedTermListFactory(Integer.class, "000")));
    facetHandlers.add(new SimpleFacetHandler("storenum", new PredefinedTermListFactory(Long.class,
View Full Code Here

        // compact multi should honor depends
        return new CompactMultiValueFacetHandler(name, fieldName, termListFactory);
    }

    static MultiValueFacetHandler buildMultiHandler(String name, String fieldName, TermListFactory<?> termListFactory, Set<String> depends, int invertedIndexPenalty) {
        return new MultiValueFacetHandler(name, fieldName, termListFactory, null, depends, invertedIndexPenalty);
    }
View Full Code Here

        new MultiValueFacetDataCache();
    facetDataCache.valArray = dictionary;
    facetDataCache.freqs = freqs;

    FacetHandler facetHandler =
        new MultiValueFacetHandler("column", 32);

    expect(indexReader.maxDoc()).andReturn(1000).anyTimes();
    expect(indexReader.getFacetHandler("column")).andReturn(facetHandler);
    expect(indexReader.getFacetData("column")).andReturn(facetDataCache).anyTimes();
    replay(indexReader);
View Full Code Here

TOP

Related Classes of com.browseengine.bobo.facets.impl.MultiValueFacetHandler

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.