require '../mnogo.so'

mnogo = Mnogo.new('mysql://root:@localhost/mnogosearch/','single')
# print "Ver: ",mnogo.version,"\n"
mnogo.set_param(Mnogo::UDM_PARAM_PAGE_SIZE,"5")
# mnogo.add_search_limit(Mnogo::UDM_LIMIT_TAG,"01")
mnogo.set_param(Mnogo::UDM_PARAM_CHARSET, "koi8-r")
if mnogo.version > 30204
mnogo.set_param(Mnogo::UDM_PARAM_BROWSER_CHARSET, "koi8-r")
end
res = mnogo.find("linux")
# print res.getparam(Mnogo::UDM_PARAM_FOUND),"\n"
# print mnogo.doc_count
# res.eachp(Mnogo::UDM_FIELD_TITLE) {|x| print x,"\n"}
res.each {|x| print x.title,"\n"}
# print res.xml.gsub(/&/, '&amp;').gsub("\2",'<font color="000088"><b>').gsub("\3",'</b></font>')
# mnogo.cat.list.each { |x| print 'A:',x.link,x.name,"\n" }
