[Groonga-commit] groonga/groonga at 12fe6f8 [master] Add a tool that generate data for long posting list

Back to archive index
Kouhei Sutou null+****@clear*****
Fri Jan 18 09:32:29 JST 2019


Kouhei Sutou	2019-01-18 09:32:29 +0900 (Fri, 18 Jan 2019)

  Revision: 12fe6f84b3e22144a9d7afd8f267d1d4fcdbd553
  https://github.com/groonga/groonga/commit/12fe6f84b3e22144a9d7afd8f267d1d4fcdbd553

  Message:
    Add a tool that generate data for long posting list

  Added files:
    tools/generate-long-posting-list-data.rb

  Added: tools/generate-long-posting-list-data.rb (+24 -0) 100755
===================================================================
--- /dev/null
+++ tools/generate-long-posting-list-data.rb    2019-01-18 09:32:29 +0900 (595d768a3)
@@ -0,0 +1,24 @@
+#!/usr/bin/env ruby
+
+require "json"
+
+puts(<<-COMMANDS)
+table_create Data TABLE_NO_KEY
+column_create Data value COLUMN_SCALAR Text
+
+table_create Terms TABLE_PAT_KEY ShortText \
+  --normalizer NormalizerNFKC100 \
+  --default_tokenizer TokenRegexp
+column_create Terms index COLUMN_INDEX|WITH_POSITION Data value
+COMMANDS
+
+puts(<<-LOAD)
+load --table Data
+[
+LOAD
+100000.times do
+  puts({"value" => "X"}.to_json)
+end
+puts(<<-LOAD)
+]
+LAOD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190118/e2d38bbc/attachment.html>


More information about the Groonga-commit mailing list
Back to archive index