Package com.flaptor.indextank.index.scorer

Examples of com.flaptor.indextank.index.scorer.DynamicDataManager


      parser = new IndexEngineParser(defaultField, analyzer);
    } else {
      parser = new IndexEngineParser(defaultField);
    }
     
      boostsManager = new DynamicDataManager(boostsSize, baseDir);
       
      scorer = new BoostsScorer(boostsManager, Maps.<Integer, ScoreFunction>newHashMap());
       
        functionsManager = new UserFunctionsManager(scorer);
        boolean someFunctionDefined = false;
View Full Code Here


    public static void main(String[] args) throws IOException {
        File dir = new File(args[0]);
        int bc = Integer.parseInt(args[1]);
        NewPopularityIndex index = new NewPopularityIndex(dir);
        InMemoryStorage ims = new InMemoryStorage(dir, true);
        DynamicDataManager ddm = new DynamicDataManager(bc, dir);
        Scanner in = new Scanner(System.in);
       
        while (in.hasNextLine()) {
            String line = in.nextLine();
            if (line.startsWith("get ")) {
                String idStr = line.substring(4);
                DocId docId = new DocId(idStr);
                System.out.println(ims.getDocument(idStr));
                Boosts boosts = ddm.getBoosts(docId);
                System.out.println("timestamp: " + boosts.getTimestamp());
                for (int i = 0; i < bc; i++) {
                    System.out.println("var["+i+"]: " + boosts.getBoost(i));
                }
                System.out.println(ddm.getCategoryValues(docId));
            } else {
                List<String> suggestions = index.getMostPopular(line);
                for (String sugg : suggestions) {
                    System.out.print(" * ");
                    System.out.println(sugg);
View Full Code Here

      parser = new IndexEngineParser(defaultField, analyzer);
    } else {
      parser = new IndexEngineParser(defaultField);
    }
     
      boostsManager = new DynamicDataManager(boostsSize, baseDir);
       
      scorer = new BoostsScorer(boostsManager, Maps.<Integer, ScoreFunction>newHashMap());
       
        functionsManager = new UserFunctionsManager(scorer);
        boolean someFunctionDefined = false;
View Full Code Here

            throw new IndexEngineApiException("Interrupted while searching.", e);
        }
    }

    private VariablesRangeFilter convertToVariableRangeFilter(List<RangeFilter> rangeFilters) {
        DynamicDataManager dynamicDataManager = engine.getDynamicDataManager();
        Multimap<Integer, Pair<Float, Float>> filters = HashMultimap.create();
        for (RangeFilter filter : rangeFilters) {
            filters.put(filter.get_key(), new Pair<Float, Float>(filter.is_no_floor() ? null : (float)filter.get_floor(), filter.is_no_ceil() ? null : (float)filter.get_ceil()));
        }
       
View Full Code Here

       
        return new VariablesRangeFilter(dynamicDataManager, filters);
    }

    private FunctionRangeFilter convertToFunctionRangeFilter(List<RangeFilter> rangeFilters) {
        DynamicDataManager dynamicDataManager = engine.getDynamicDataManager();
        BoostsScorer scorer = engine.getScorer();
        Multimap<Integer, Pair<Float, Float>> filters = HashMultimap.create();
        for (RangeFilter filter : rangeFilters) {
            filters.put(filter.get_key(), new Pair<Float, Float>(filter.is_no_floor() ? null : (float)filter.get_floor(), filter.is_no_ceil() ? null : (float)filter.get_ceil()));
        }
View Full Code Here

TOP

Related Classes of com.flaptor.indextank.index.scorer.DynamicDataManager

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.