/*
 *  call-seq:
 *     searcher.search(query, options = {}) -> TopDocs
 *
 *  Run a query through the Searcher on the index. A TopDocs object is
 *  returned with the relevant results. The +query+ is a built in Query
 *  object. Here are the options;
 *
 *  === Options
 *
 *  :offset::       Default: 0. The offset of the start of the section of the
 *                  result-set to return. This is used for paging through
 *                  results. Let's say you have a page size of 10. If you
 *                  don't find the result you want among the first 10 results
 *                  then set +:offset+ to 10 and look at the next 10 results,
 *                  then 20 and so on.
 *  :limit::        Default: 10. This is the number of results you want
 *                  returned, also called the page size. Set +:limit+ to
 *                  +:all+ to return all results
 *  :sort::         A Sort object or sort string describing how the field
 *                  should be sorted. A sort string is made up of field names
 *                  which cannot contain spaces and the word "DESC" if you
 *                  want the field reversed, all seperated by commas. For
 *                  example; "rating DESC, author, title"
 *  :filter::       a Filter object to filter the search results with
 *  :filter_proc::  a filter Proc is a Proc which takes the doc_id, the score
 *                  and the Searcher object as its parameters and returns a
 *                  Boolean value specifying whether the result should be
 *                  included in the result set.
 */
static VALUE
frt_sea_search(int argc, VALUE *argv, VALUE self)
{
    GET_SEA();
    VALUE rquery, roptions;
    Query *query;
    rb_scan_args(argc, argv, "11", &rquery, &roptions);
    Data_Get_Struct(rquery, Query, query);
    return frt_get_td(frt_sea_search_internal(query, roptions, sea), self);
}