Class: Velocity::Instance::SearchCollection::Status::IndexerStatus

Inherits:
ServiceStatus
  • Object
show all
Defined in:
lib/acceleration/velocity.rb

Overview

Wrapper for the index status object

Instance Attribute Summary

Attributes inherited from ServiceStatus

#doc

Instance Method Summary collapse

Methods inherited from ServiceStatus

#attribute, #attributes, #has_status?, #initialize, #method_missing, #respond_to_missing?

Constructor Details

This class inherits a constructor from Velocity::Instance::SearchCollection::Status::ServiceStatus

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Velocity::Instance::SearchCollection::Status::ServiceStatus

Instance Method Details

#filesObject

Get information about the index files

The content counts per file are available in a subarray at key :contents.



934
935
936
937
# File 'lib/acceleration/velocity.rb', line 934

def files
  doc.xpath('vse-index-file').collection do |f|
  end
end

#servingObject

TODO: implement convenience methods

Get index serving status



918
919
920
921
922
923
924
925
926
# File 'lib/acceleration/velocity.rb', line 918

def serving
  doc.xpath('vse-serving').first do |s|
    attrs = {}
    s.attributes.each do |key, sattr|
      attrs[key.dedasherize.to_sym] = sattr
    end
    attrs
  end
end