#! %RUBY% # Copyright (C) 2005 Network Applied Communication Laboratory Co., Ltd. # # This file is part of Rast. # See the file COPYING for redistribution information. # require "rast" properties = [ { "name" => "filename", "type" => Rast::PROPERTY_TYPE_STRING, "search" => true, "text_search" => false, "full_text_search" => false, "unique" => true, }, { "name" => "title", "type" => Rast::PROPERTY_TYPE_STRING, "search" => false, "text_search" => true, "full_text_search" => true, "unique" => false, }, { "name" => "last_modified", "type" => Rast::PROPERTY_TYPE_DATE, "search" => true, "text_search" => false, "full_text_search" => false, "unique" => false, }, { "name" => "filesize", "type" => Rast::PROPERTY_TYPE_UINT, "search" => true, "text_search" => false, "full_text_search" => false, "unique" => false, }, ] options = { "byte_order" => Rast::LITTLE_ENDIAN, "encoding" => "utf8", "preserve_text" => true, "properties" => properties, } if ARGV.length < 1 $stderr.printf("usage: %s \n", $0) exit(1) end dbpath = ARGV[0] Rast::DB.create(dbpath, options)