ryanlayer/giggle

api clarifications

brentp opened this issue · 1 comments

  1. How to get list of files from giggle index? I see giggle_index->file_index[i]->file_name, but how do we know how many files are in file_index?

  2. giggle_query_result->num_files: is this always == the number of files in the giggle index? Or is it the length of \*\*offsets? If the latter? How to know which files are associated with which offsets?

  3. (related to 2.) I assume that giggle_get_query_len means the count of results for the given file_id? is the file_id? Can I always use file_id up to number of files in the index?

I think you are looking at older code.

  1. To get the total number of files use: giggle_index->file_idx->index->num
  2. giggle_query_result->num_files is always equal to the total number of
    files:

To get offsets for the ith file:

struct giggle_query_iter *gqi = giggle_get_query_itr(gqr, i);
struct file_data *fd = file_index_get(gi->file_idx, i);
printf("%s\n", fd->file_name);

  1. giggle_get_query_len(struct giggle_query_result *gqr, uint32_t file_id)
    gives the number of hits for that file_id

the file_id range is 0 ... giggle_index->file_idx->index->num

On Tue, Nov 8, 2016 at 11:49 AM, Brent Pedersen - Bioinformatics <
notifications@github.com> wrote:

How to get list of files from giggle index? I see
giggle_index->file_index[i]->file_name, but how do we know how many
files are in file_index?
2.

giggle_query_result->num_files: is this always == the number of files
in the giggle index? Or is it the length of offsets? If the
latter? How to know which files are associated with which offsets?
3.

(related to 2.) I assume that giggle_get_query_len means the count
of results for the given file_id? is the file_id? Can I always use file_id
up to number of files in the index?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#16, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAlDUUxrQ-Zqp7JEk9AmSgRyXDJ7Bqsdks5q8MRJgaJpZM4Ksxmn
.

Ryan Layer