Package ivory.bloomir.data

Examples of ivory.bloomir.data.CompressedPostings


    int[] results = new int[hits];

    //If the lenght of the query is one, just return the first n documents
    //in the postings list.
    if(query.length == 1) {
      CompressedPostings ps = postings[query[0]];
      int df = dfs[query[0]];
      if(hits > df) {
        hits = df;
      }
      int nbBlocks = ps.getBlockCount();
      int cnt = 0;
      for(int i = 0; i < nbBlocks; i++) {
        int bSize = ps.decompressBlock(decomp, i);
        int docno = 0;

        for(int j = 0; j < bSize; j++) {
          docno += decomp[j];
          results[cnt] = docno;
          cnt++;
          if(cnt >= hits) {
            return results;
          }
        }
      }
      return results;
    }

    //Find the minimum Df value
    int minDf = Integer.MAX_VALUE;
    int indexOfMinDf = -1;
    for (int i = 0; i < query.length; i++) {
      int df = dfs[query[i]];
      if (df < minDf) {
        minDf = df;
        indexOfMinDf = i;
      }
    }

    //Prepare a list of signatures to perform membership tests against
    Signature[] list = new Signature[query.length - 1];
    int pos = 0;
    for (int i = 0; i < query.length; i++) {
      if(i != indexOfMinDf) {
        list[pos] = filters[query[i]];
        pos++;
      }
    }

    CompressedPostings ps = postings[query[indexOfMinDf]];
    int cnt = 0;
    int nbBlocks = ps.getBlockCount();
    for (int i = 0; i < nbBlocks; i++) {
      int bSize = ps.decompressBlock(decomp, i);
      int docno = 0;
      boolean pick = true;

      for(int j = 0; j < bSize; j++) {
        docno += decomp[j];
View Full Code Here


    int[] results = new int[hits];

    //If the lenght of the query is one, just return the first n documents
    //in the postings list.
    if(query.length == 1) {
      CompressedPostings ps = postings[query[0]];
      int df = dfs[query[0]];
      if(hits > df) {
        hits = df;
      }
      int nbBlocks = ps.getBlockCount();
      int cnt = 0;
      for(int i = 0; i < nbBlocks; i++) {
        int bSize = ps.decompressBlock(decomp, i);
        int docno = 0;

        for(int j = 0; j < bSize; j++) {
          docno += decomp[j];
          results[cnt] = docno;
View Full Code Here

    int[] results = new int[hits];

    //If the lenght of the query is one, just return the first n documents
    //in the postings list.
    if(query.length == 1) {
      CompressedPostings ps = postings[query[0]];
      int df = dfs[query[0]];
      if(hits > df) {
        hits = df;
      }
      int nbBlocks = ps.getBlockCount();
      int cnt = 0;
      for(int i = 0; i < nbBlocks; i++) {
        int bSize = ps.decompressBlock(decomp, i);
        int docno = 0;

        for(int j = 0; j < bSize; j++) {
          docno += decomp[j];
          results[cnt] = docno;
View Full Code Here

    int[] results = new int[hits];

    //If the lenght of the query is one, just return the first n documents
    //in the postings list.
    if(query.length == 1) {
      CompressedPostings ps = postings[query[0]];
      int df = dfs[query[0]];
      if(hits > df) {
        hits = df;
      }
      int nbBlocks = ps.getBlockCount();
      int cnt = 0;
      for(int i = 0; i < nbBlocks; i++) {
        int bSize = ps.decompressBlock(decomp, i);
        int docno = 0;

        for(int j = 0; j < bSize; j++) {
          docno += decomp[j];
          results[cnt] = docno;
View Full Code Here

    int[] results = new int[hits];

    //If the lenght of the query is one, just return the first n documents
    //in the postings list.
    if(query.length == 1) {
      CompressedPostings ps = postings[query[0]];
      int df = dfs[query[0]];
      if(hits > df) {
        hits = df;
      }
      int nbBlocks = ps.getBlockCount();
      int cnt = 0;
      for(int i = 0; i < nbBlocks; i++) {
        int bSize = ps.decompressBlock(decomp, i);
        int docno = 0;

        for(int j = 0; j < bSize; j++) {
          docno += decomp[j];
          results[cnt] = docno;
          cnt++;
          if(cnt >= hits) {
            return results;
          }
        }
      }
      return results;
    }

    //Find the minimum Df value
    int minDf = Integer.MAX_VALUE;
    int indexOfMinDf = -1;
    for (int i = 0; i < query.length; i++) {
      int df = dfs[query[i]];
      if (df < minDf) {
        minDf = df;
        indexOfMinDf = i;
      }
    }

    //Prepare a list of signatures to perform membership tests against
    Signature[] list = new Signature[query.length - 1];
    int pos = 0;
    for (int i = 0; i < query.length; i++) {
      if(i != indexOfMinDf) {
        list[pos] = filters[query[i]];
        pos++;
      }
    }

    CompressedPostings ps = postings[query[indexOfMinDf]];
    int cnt = 0;
    int nbBlocks = ps.getBlockCount();
    for (int i = 0; i < nbBlocks; i++) {
      int bSize = ps.decompressBlock(decomp, i);
      int docno = 0;
      boolean pick = true;

      for(int j = 0; j < bSize; j++) {
        docno += decomp[j];
View Full Code Here

    int[] results = new int[hits];

    //If the lenght of the query is one, just return the first n documents
    //in the postings list.
    if(query.length == 1) {
      CompressedPostings ps = postings[query[0]];
      int df = dfs[query[0]];
      if(hits > df) {
        hits = df;
      }
      int nbBlocks = ps.getBlockCount();
      int cnt = 0;
      for(int i = 0; i < nbBlocks; i++) {
        int bSize = ps.decompressBlock(decomp, i);
        int docno = 0;

        for(int j = 0; j < bSize; j++) {
          docno += decomp[j];
          results[cnt] = docno;
View Full Code Here

TOP

Related Classes of ivory.bloomir.data.CompressedPostings

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.