Ignore:
Timestamp:
2008-06-25T15:38:55+12:00 (16 years ago)
Author:
mdewsnip
Message:

Modifying get_metadata_values() and get_documents_with_metadata_value() to take an array of metadata elements, rather than just one metadata element. This allows building a dynamic classifier on multiple metadata elements.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/src/protocol/recptprototools.cpp

    r16039 r16180  
    251251
    252252
    253 bool get_metadata_values (const text_t metadata_element_name, const text_t metadata_value_filter,
     253bool get_metadata_values (const text_t metadata_elements, const text_t metadata_value_filter,
    254254              const text_t metadata_value_grouping_expression, const text_t &collection,
    255255              recptproto *collectproto, FilterResponse_t &response, ostream &logout)
     
    265265
    266266  OptionValue_t request_option;
    267   request_option.name = "MetadataElement";
    268   request_option.value = metadata_element_name;
     267  request_option.name = "MetadataElements";
     268  request_option.value = metadata_elements;
    269269  request.filterOptions.push_back (request_option);
    270270  request_option.name = "MetadataValueFilter";
     
    281281    outconvertclass text_t2ascii;
    282282    logout << text_t2ascii
    283        << "Error: call to filter failed for " << metadata_element_name
     283       << "Error: call to filter failed for " << metadata_elements
    284284       << " in recptprototools::get_metadata_values ("
    285285       << get_comerror_string (err) << ")\n";
     
    291291
    292292
    293 bool get_documents_with_metadata_value (const text_t metadata_element_name, const text_t metadata_value,
     293bool get_documents_with_metadata_value (const text_t metadata_elements, const text_t metadata_value,
    294294                    const text_t sort_by_metadata_element_name, const text_t &collection,
    295295                    recptproto *collectproto, FilterResponse_t &response, ostream &logout)
     
    305305
    306306  OptionValue_t request_option;
    307   request_option.name = "MetadataElement";
    308   request_option.value = metadata_element_name;
     307  request_option.name = "MetadataElements";
     308  request_option.value = metadata_elements;
    309309  request.filterOptions.push_back (request_option);
    310310  request_option.name = "MetadataValue";
     
    321321    outconvertclass text_t2ascii;
    322322    logout << text_t2ascii
    323        << "Error: call to filter failed for " << metadata_element_name << " = " << metadata_value
     323       << "Error: call to filter failed for " << metadata_elements << " = " << metadata_value
    324324       << " in recptprototools::get_documents_with_metadata_value ("
    325325       << get_comerror_string (err) << ")\n";
Note: See TracChangeset for help on using the changeset viewer.