Skip to content
Permalink
Browse files

fixed #963 index_field_lengths index option for TSV and CSV piped sou…

…rces; added regressions to test 257
  • Loading branch information...
tomatolog committed Jul 25, 2019
1 parent 1266d54 commit d0a7c95906b9b5ba33c98267d54501cfe27508d6
Showing with 25 additions and 1 deletion.
  1. +3 −0 src/sphinx.cpp
  2. +1 −1 test/test_257/model.bin
  3. +21 −0 test/test_257/test.xml
m_tSchema.SetFieldWordpart ( i, eWordpart );
}

if ( !AddAutoAttrs ( sError ) )
return false;

AllocDocinfo();

m_tHits.m_dData.Reserve ( m_iMaxHits );
@@ -1 +1 @@
a:1:{i:0;a:6:{i:0;a:3:{s:8:"sphinxql";s:35:"SELECT * FROM xml11 ORDER BY id asc";s:5:"error";s:49:"unknown local index(es) 'xml11' in search request";s:5:"errno";i:1064;}i:1;a:3:{s:8:"sphinxql";s:35:"SELECT * FROM xml12 ORDER BY id asc";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:3:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";s:3:"uid";s:2:"11";}i:1;a:3:{s:2:"id";s:1:"2";s:3:"gid";s:2:"12";s:3:"uid";s:2:"12";}}}i:2;a:3:{s:8:"sphinxql";s:35:"SELECT * FROM tsv21 ORDER BY id asc";s:5:"error";s:49:"unknown local index(es) 'tsv21' in search request";s:5:"errno";i:1064;}i:3;a:3:{s:8:"sphinxql";s:35:"SELECT * FROM tsv22 ORDER BY id asc";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:3:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";s:3:"uid";s:2:"11";}i:1;a:3:{s:2:"id";s:1:"2";s:3:"gid";s:2:"12";s:3:"uid";s:2:"12";}}}i:4;a:3:{s:8:"sphinxql";s:35:"SELECT * FROM csv31 ORDER BY id asc";s:5:"error";s:49:"unknown local index(es) 'csv31' in search request";s:5:"errno";i:1064;}i:5;a:3:{s:8:"sphinxql";s:35:"SELECT * FROM csv32 ORDER BY id asc";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:3:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";s:3:"uid";s:2:"11";}i:1;a:3:{s:2:"id";s:1:"2";s:3:"gid";s:2:"12";s:3:"uid";s:2:"12";}}}}}
a:1:{i:0;a:8:{i:0;a:3:{s:8:"sphinxql";s:35:"SELECT * FROM xml11 ORDER BY id asc";s:5:"error";s:49:"unknown local index(es) 'xml11' in search request";s:5:"errno";i:1064;}i:1;a:3:{s:8:"sphinxql";s:35:"SELECT * FROM xml12 ORDER BY id asc";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:3:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";s:3:"uid";s:2:"11";}i:1;a:3:{s:2:"id";s:1:"2";s:3:"gid";s:2:"12";s:3:"uid";s:2:"12";}}}i:2;a:3:{s:8:"sphinxql";s:35:"SELECT * FROM tsv21 ORDER BY id asc";s:5:"error";s:49:"unknown local index(es) 'tsv21' in search request";s:5:"errno";i:1064;}i:3;a:3:{s:8:"sphinxql";s:35:"SELECT * FROM tsv22 ORDER BY id asc";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:3:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";s:3:"uid";s:2:"11";}i:1;a:3:{s:2:"id";s:1:"2";s:3:"gid";s:2:"12";s:3:"uid";s:2:"12";}}}i:4;a:3:{s:8:"sphinxql";s:35:"SELECT * FROM csv31 ORDER BY id asc";s:5:"error";s:49:"unknown local index(es) 'csv31' in search request";s:5:"errno";i:1064;}i:5;a:3:{s:8:"sphinxql";s:35:"SELECT * FROM csv32 ORDER BY id asc";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:3:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";s:3:"uid";s:2:"11";}i:1;a:3:{s:2:"id";s:1:"2";s:3:"gid";s:2:"12";s:3:"uid";s:2:"12";}}}i:6;a:3:{s:8:"sphinxql";s:36:"SELECT * FROM tsv_l1 ORDER BY id asc";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:5:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";s:3:"uid";s:2:"11";s:9:"title_len";s:1:"2";s:11:"content_len";s:1:"7";}i:1;a:5:{s:2:"id";s:1:"2";s:3:"gid";s:2:"12";s:3:"uid";s:2:"12";s:9:"title_len";s:1:"2";s:11:"content_len";s:1:"7";}}}i:7;a:3:{s:8:"sphinxql";s:36:"SELECT * FROM csv_l1 ORDER BY id asc";s:10:"total_rows";i:2;s:4:"rows";a:2:{i:0;a:5:{s:2:"id";s:1:"1";s:3:"gid";s:2:"11";s:3:"uid";s:2:"11";s:9:"title_len";s:1:"2";s:11:"content_len";s:1:"7";}i:1;a:5:{s:2:"id";s:1:"2";s:3:"gid";s:2:"12";s:3:"uid";s:2:"12";s:9:"title_len";s:1:"2";s:11:"content_len";s:1:"7";}}}}}
@@ -118,6 +118,22 @@ index csv32
path = <data_path/>/csv32
dict = keywords
}

index tsv_l1
{
source = src22
path = <data_path/>/tsv_l1
dict = keywords
index_field_lengths = 1
}

index csv_l1
{
source = src32
path = <data_path/>/csv_l1
dict = keywords
index_field_lengths = 1
}
</config>

<sphqueries>
@@ -127,6 +143,11 @@ index csv32
<sphinxql>SELECT * FROM tsv22 ORDER BY id asc</sphinxql>
<sphinxql>SELECT * FROM csv31 ORDER BY id asc</sphinxql>
<sphinxql>SELECT * FROM csv32 ORDER BY id asc</sphinxql>

<!-- regression crash on field length -->
<sphinxql>SELECT * FROM tsv_l1 ORDER BY id asc</sphinxql>
<sphinxql>SELECT * FROM csv_l1 ORDER BY id asc</sphinxql>

</sphqueries>

</test>

0 comments on commit d0a7c95

Please sign in to comment.
You can’t perform that action at this time.