Package com.flaptor.indextank.index.term

Examples of com.flaptor.indextank.index.term.DocTermMatch


                    public boolean hasNext() {
                        return it.hasNext();
                    }
                    @Override
                    public RawMatch next() {
                        DocTermMatch dtm = it.next();
                        m.setRawId(dtm.getRawId());
                        m.setScore(dtm.getTermScore());
                        m.setBoost(boost);
                        //System.out.println("TERM: [S:"+m.getScore()+", B:"+m.getBoost()+", N:"+m.getNorm()+"]");
                        return m;
                    }
                    @Override
View Full Code Here


            private Integer nextId = null;
            DocTermMatch m = null;
           
            private DocTermMatch match(int rawId, int freq, float norm) throws IOException {
                if (m == null) {
                    m = new DocTermMatch(rawId, new int[freq], freq, norm);
                } else {
                    m.setRawId(rawId);
                    m.setPositionsLength(freq);
                    m.setNormalization(norm);
                }
View Full Code Here

    }

  protected RawMatch tryMatch(int id, List<DocTermMatch> items) {
    List<SkippableIterable<Integer>> positionsList = Lists.newArrayList();
    for (int i = 0; i < items.size(); i++) {
      DocTermMatch m = items.get(i);
      List<Integer> positions = Ints.asList(m.getPositions()).subList(0, m.getPositionsLength());
      positionsList.add(Skippables.fromIterable(Iterables.transform(positions, addFunction(-this.termPositions[i]))));
    }
   
    boolean matches = new IdentityIntersection<Integer>(positionsList).iterator().hasNext();
   
View Full Code Here

import com.flaptor.indextank.util.SkippableIterator;

class DocTermMatchList implements SkippableIterable<DocTermMatch> {
    static class DocTermMatchEntry {
        DocTermMatchEntry(int idx, int[] positions, double contextSize) {
            this.match = new DocTermMatch(idx, positions, positions.length, Math.sqrt(1.0 / contextSize));
        }
View Full Code Here

TOP

Related Classes of com.flaptor.indextank.index.term.DocTermMatch

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.