mirror of
https://github.com/apache/lucene.git
synced 2025-02-13 13:35:37 +00:00
git-svn-id: https://svn.apache.org/repos/asf/incubator/solr/trunk@496871 13f79535-47bb-0310-9956-ffa450edef68
25 lines
390 B
Ruby
25 lines
390 B
Ruby
require 'rexml/xpath'
|
|
|
|
module Solr
|
|
module Response
|
|
class Commit < Solr::Response::Xml
|
|
attr_reader :ok
|
|
|
|
def initialize(xml)
|
|
super(xml)
|
|
e = REXML::XPath.first(@doc, './result')
|
|
if e and e.attributes['status'] == '0'
|
|
@ok = true
|
|
else
|
|
@ok = false
|
|
end
|
|
end
|
|
|
|
def ok?
|
|
@ok
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|