Class: Libis::Services::Sharepoint::Search
- Inherits:
-
Object
- Object
- Libis::Services::Sharepoint::Search
- Includes:
- GenericSearch, Libis::Services::SoapClient, Tools::Logger
- Defined in:
- lib/libis/services/sharepoint/search.rb,
lib/libis/services/sharepoint/connector.rb
Instance Attribute Summary
Attributes included from Libis::Services::SoapClient
Attributes included from GenericSearch
#base, #host, #index, #num_records, #record_pointer, #session_id, #set_number, #term
Instance Method Summary collapse
- #each(options) ⇒ Object
-
#initialize(options = {}) ⇒ Search
constructor
A new instance of Search.
- #query(term, options = {}) ⇒ Object
Methods included from Libis::Services::SoapClient
#configure, #operations, #request
Methods included from GenericSearch
Constructor Details
#initialize(options = {}) ⇒ Search
Returns a new instance of Search.
12 13 14 |
# File 'lib/libis/services/sharepoint/search.rb', line 12 def initialize puts 'TODO' end |
Instance Method Details
#each(options) ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/libis/services/sharepoint/connector.rb', line 62 def each() # we start with a new search restart_query get_next_set while records_to_process? yield [:result][:records][[:current]] [:current] += 1 get_next_set() if require_next_set?() end restart_query() end |
#query(term, options = {}) ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/libis/services/sharepoint/connector.rb', line 45 def query(term, = {}) [:term] = term [:limit] ||= 100 [:value_type] ||= 'Text' [:query_operator] = MY_QUERY_SYMBOLS[[:query_operator] || '=='] [:query_operator] = 'BeginsWith' if term =~ /^[^*]+\*$/ [:query_operator] = 'Contains' if term =~ /^\*[^*]+\*$/ restart_query end |