Package com.browseengine.bobo.query

Examples of com.browseengine.bobo.query.ScoreAdjusterQuery


          SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd");
        Date d = format.parse("2006/06/01");
        long fromTime = d.getTime();
       
        RecencyBoostScorerBuilder recencyBuilder = new RecencyBoostScorerBuilder("date", 2.0f, TimeUnit.DAYS.convert(fromTime,TimeUnit.MILLISECONDS), 30L, TimeUnit.DAYS);
        ScoreAdjusterQuery sq = new ScoreAdjusterQuery(rawQuery,recencyBuilder);
        br.setQuery(sq);
       
          res = doTest(br,4,null,new String[]{"7","1","2","5"});
       
        hits = res.getHits();
View Full Code Here


    map = new HashMap<String,Float>();
    map.put("rabbit", 5.0f);
    map.put("dog", 7.0f);
      boostMaps.put("tag", map);
     
      Query q = new ScoreAdjusterQuery(new MatchAllDocsQuery(), new FacetBasedBoostScorerBuilder(boostMaps));
     
      BrowseRequest br = new BrowseRequest();
      br.setQuery(q);
    br.setOffset(0);
    br.setCount(10);
View Full Code Here

    Date d = format.parse("2006/06/01");
    long fromTime = d.getTime();

    RecencyBoostScorerBuilder recencyBuilder = new RecencyBoostScorerBuilder("date", 2.0f,
        TimeUnit.DAYS.convert(fromTime, TimeUnit.MILLISECONDS), 30L, TimeUnit.DAYS);
    ScoreAdjusterQuery sq = new ScoreAdjusterQuery(rawQuery, recencyBuilder);
    br.setQuery(sq);

    res = doTest(br, 4, null, new String[] { "7", "1", "2", "5" });

    hits = res.getHits();
View Full Code Here

    map = new HashMap<String, Float>();
    map.put("rabbit", 5.0f);
    map.put("dog", 7.0f);
    boostMaps.put("tag", map);

    Query q = new ScoreAdjusterQuery(new MatchAllDocsQuery(), new FacetBasedBoostScorerBuilder(
        boostMaps));

    BrowseRequest br = new BrowseRequest();
    br.setQuery(q);
    br.setOffset(0);
View Full Code Here

TOP

Related Classes of com.browseengine.bobo.query.ScoreAdjusterQuery

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.