rroonga 2.0.8 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/README.textile +2 -2
  2. data/bin/groonga-index-dump +47 -0
  3. data/doc/text/news.textile +733 -0
  4. data/doc/text/tutorial.textile +535 -0
  5. data/example/bookmark.rb +1 -1
  6. data/ext/groonga/rb-grn-database.c +21 -24
  7. data/ext/groonga/rb-grn-double-array-trie.c +50 -58
  8. data/ext/groonga/rb-grn-exception.c +18 -1
  9. data/ext/groonga/rb-grn-hash.c +18 -3
  10. data/ext/groonga/rb-grn-index-column.c +50 -2
  11. data/ext/groonga/rb-grn-normalizer.c +83 -0
  12. data/ext/groonga/rb-grn-object.c +18 -14
  13. data/ext/groonga/rb-grn-patricia-trie.c +17 -2
  14. data/ext/groonga/rb-grn-query-logger.c +263 -0
  15. data/ext/groonga/rb-grn-snippet.c +6 -0
  16. data/ext/groonga/rb-grn-table-key-support.c +204 -13
  17. data/ext/groonga/rb-grn-table.c +124 -46
  18. data/ext/groonga/rb-grn.h +14 -3
  19. data/ext/groonga/rb-groonga.c +2 -0
  20. data/lib/groonga/database.rb +7 -0
  21. data/lib/groonga/dumper.rb +21 -2
  22. data/lib/groonga/index-column.rb +170 -0
  23. data/lib/groonga/query-logger.rb +129 -0
  24. data/lib/groonga/record.rb +32 -8
  25. data/lib/groonga/schema.rb +231 -288
  26. data/lib/groonga.rb +2 -1
  27. data/rroonga-build.rb +2 -2
  28. data/rroonga.gemspec +11 -7
  29. data/test/groonga-test-utils.rb +18 -6
  30. data/test/test-hash.rb +49 -20
  31. data/test/test-index-cursor.rb +4 -4
  32. data/{Gemfile → test/test-normalizer.rb} +9 -5
  33. data/test/test-pagination.rb +1 -1
  34. data/test/test-patricia-trie.rb +8 -0
  35. data/test/test-schema.rb +16 -13
  36. data/test/test-snippet.rb +5 -0
  37. data/test/test-table.rb +24 -12
  38. data/test/test-view.rb +0 -1
  39. metadata +154 -136
  40. data/AUTHORS +0 -5
  41. data/Rakefile +0 -203
  42. data/bin/groonga-query-log-extract +0 -117
data/README.textile CHANGED
@@ -48,8 +48,8 @@ h2. Install
48
48
 
49
49
  h2. Documents
50
50
 
51
- * "Reference manual in English":http://groonga.rubyforge.org/rroonga/en/
52
- * "Reference manual in Japanese":http://groonga.rubyforge.org/rroonga/ja/
51
+ * "Reference manual in English":http://ranguba.org/rroonga/en/
52
+ * "Reference manual in Japanese":http://ranguba.org/rroonga/ja/
53
53
 
54
54
  h2. Mailing list
55
55
 
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env ruby
2
+ # -*- coding: utf-8 -*-
3
+ #
4
+ # Copyright (C) 2012 Kouhei Sutou <kou@clear-code.com>
5
+ #
6
+ # This library is free software; you can redistribute it and/or
7
+ # modify it under the terms of the GNU Lesser General Public
8
+ # License version 2.1 as published by the Free Software Foundation.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
+
19
+ require 'ostruct'
20
+ require 'optparse'
21
+ require 'pathname'
22
+
23
+ require 'groonga'
24
+
25
+ options = OpenStruct.new
26
+ options.output_directory = "index-dump"
27
+
28
+ option_parser = OptionParser.new do |parser|
29
+ parser.banner += " DB_PATH"
30
+
31
+ parser.on("--output-directory=DIRECTORY",
32
+ "Dump index to under DIRECTORY",
33
+ "(#{options.ouitput_directory})") do |directory|
34
+ options.output_directory = directory
35
+ end
36
+ end
37
+ args = option_parser.parse!(ARGV)
38
+
39
+ if args.size != 1
40
+ puts(option_parser)
41
+ exit(false)
42
+ end
43
+ db_path = args[0]
44
+
45
+ Groonga::Database.open(db_path) do |database|
46
+ database.dump_index(options.output_directory)
47
+ end