[Groonga-commit] groonga/wikipedia-search at c568217 [master] Reduce the max N characters to 1000000

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Nov 7 21:59:25 JST 2016


Kouhei Sutou	2016-11-07 21:59:25 +0900 (Mon, 07 Nov 2016)

  New Revision: c56821748fafa509e6131256d35e15ec315cfdef
  https://github.com/groonga/wikipedia-search/commit/c56821748fafa509e6131256d35e15ec315cfdef

  Message:
    Reduce the max N characters to 1000000
    
    Because the following error was returned:
    
        string is too long for tsvector (1618908 bytes, max 1048575 bytes)

  Modified files:
    benchmark/centos7/postgresql.sh
    config/sql/indexes.textsearch.sql

  Modified: benchmark/centos7/postgresql.sh (+1 -1)
===================================================================
--- benchmark/centos7/postgresql.sh    2016-11-07 21:35:40 +0900 (0d451b2)
+++ benchmark/centos7/postgresql.sh    2016-11-07 21:59:25 +0900 (325c3bc)
@@ -461,7 +461,7 @@ benchmark_search_textsearch()
     commands+=("--command" "${enable_seqscan}")
     commands+=("--command" "\\timing")
     for i in $(seq ${n_search_tries}); do
-      target="to_tsvector('english', text)"
+      target="to_tsvector('english', substring(text from 0 for 1000000))"
       query="to_tsquery('english', '$(echo ${search_word} | sed -e 's/ OR / | /g')')"
       where="${target} @@ ${query}"
       commands+=("--command" "SELECT COUNT(*) FROM wikipedia WHERE ${where}")

  Modified: config/sql/indexes.textsearch.sql (+2 -1)
===================================================================
--- config/sql/indexes.textsearch.sql    2016-11-07 21:35:40 +0900 (f1f3eab)
+++ config/sql/indexes.textsearch.sql    2016-11-07 21:59:25 +0900 (4b81caf)
@@ -1,2 +1,3 @@
 CREATE INDEX wikipedia_index_textsearch ON wikipedia
- USING GIN (to_tsvector('english', title), to_tsvector('english', text));
+ USING GIN (to_tsvector('english', title),
+            to_tsvector('english', substring(text from 0 for 1000000)));
-------------- next part --------------
HTML����������������������������...
Download 



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