Susumu Yata
null+****@clear*****
Tue Aug 1 14:55:17 JST 2017
Susumu Yata 2017-08-01 14:55:17 +0900 (Tue, 01 Aug 2017) New Revision: faa3e23f1c6556275a823bd332b364620af73cc6 https://github.com/groonga/groonga/commit/faa3e23f1c6556275a823bd332b364620af73cc6 Merged 12a2dad: Merge pull request #750 from groonga/prefix-match-using-multiple-indexes Message: test: add a test for prefix match search using multiple indexes Added files: test/command/suite/select/query/asterisk/multiple_indexes.expected test/command/suite/select/query/asterisk/multiple_indexes.test Added: test/command/suite/select/query/asterisk/multiple_indexes.expected (+23 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/query/asterisk/multiple_indexes.expected 2017-08-01 14:55:17 +0900 (8fc72fa) @@ -0,0 +1,23 @@ +table_create Docs TABLE_NO_KEY +[[0,0.0,0.0],true] +column_create Docs title COLUMN_SCALAR ShortText +[[0,0.0,0.0],true] +column_create Docs body COLUMN_SCALAR Text +[[0,0.0,0.0],true] +load --table Docs --columns 'title,body' +[ +["Groonga overview","Full text search engine."], +["Groonga indexes","Groonga uses inverted ind."], +["Conclusion","Groonga is good."] +] +[[0,0.0,0.0],3] +table_create Idx TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto +[[0,0.0,0.0],true] +column_create Idx title COLUMN_INDEX|WITH_POSITION Docs title +[[0,0.0,0.0],true] +column_create Idx body COLUMN_INDEX|WITH_POSITION Docs body +[[0,0.0,0.0],true] +select --table Docs --match_columns 'title||body' --query 'Groo*' --output_columns '_id,_score' --match_escalation_threshold -1 +[[0,0.0,0.0],[[[3],[["_id","UInt32"],["_score","Int32"]],[1,1],[2,2],[3,1]]]] +select --table Docs --match_columns 'body||title' --query 'Groo*' --output_columns '_id,_score' --match_escalation_threshold -1 +[[0,0.0,0.0],[[[3],[["_id","UInt32"],["_score","Int32"]],[2,2],[3,1],[1,1]]]] Added: test/command/suite/select/query/asterisk/multiple_indexes.test (+30 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/query/asterisk/multiple_indexes.test 2017-08-01 14:55:17 +0900 (ba7944a) @@ -0,0 +1,30 @@ +table_create Docs TABLE_NO_KEY +column_create Docs title COLUMN_SCALAR ShortText +column_create Docs body COLUMN_SCALAR Text + +load --table Docs --columns 'title,body' +[ +["Groonga overview","Full text search engine."], +["Groonga indexes","Groonga uses inverted ind."], +["Conclusion","Groonga is good."] +] + +table_create Idx TABLE_PAT_KEY ShortText \ + --default_tokenizer TokenBigram \ + --normalizer NormalizerAuto +column_create Idx title COLUMN_INDEX|WITH_POSITION Docs title +column_create Idx body COLUMN_INDEX|WITH_POSITION Docs body + +select \ + --table Docs \ + --match_columns 'title||body' \ + --query 'Groo*' \ + --output_columns '_id,_score' \ + --match_escalation_threshold -1 + +select \ + --table Docs \ + --match_columns 'body||title' \ + --query 'Groo*' \ + --output_columns '_id,_score' \ + --match_escalation_threshold -1 -------------- next part -------------- HTML����������������������������...Download