1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
<?xml version="1.0" encoding="utf-8"?>
<test>
<name>snippets vs index_exact_words</name>
<config>
searchd
{
<searchd_settings/>
}
source test
{
type = mysql
<sql_settings/>
sql_query = SELECT 1, 'text';
}
index test
{
source = test
path = <data_path/>/test
morphology = stem_en
index_exact_words = 1
}
index tstar : test
{
path = <data_path/>/tstar1
min_prefix_len = 1
morphology = stem_enru
}
index stars : test
{
path = <data_path/>/tstar2
min_infix_len = 1
morphology = stem_en
}
source test2
{
type = mysql
<sql_settings/>
sql_query = SELECT 1, 'hello this is a test' text;
}
index test2
{
source = test2
path = <data_path/>/test2
}
</config>
<db_insert>select 1;</db_insert>
<sphqueries>
<sphinxql>CALL SNIPPETS('Check vs Checking', 'test', 'check', 1 AS query_mode )</sphinxql>
<sphinxql>CALL SNIPPETS('Check vs Checking', 'test', '=check', 1 AS query_mode )</sphinxql>
<sphinxql>CALL SNIPPETS('Check vs Checking', 'test', 'checking', 1 AS query_mode )</sphinxql>
<sphinxql>CALL SNIPPETS('Check vs Checking', 'test', '=checking', 1 AS query_mode )</sphinxql>
<sphinxql>CALL SNIPPETS('the time has come, the walrus said, to handle many things, including Check vs Checking, but not quite limited to', 'test', 'check', 1 AS query_mode, 2 AS around, 50 AS limit )</sphinxql>
<sphinxql>CALL SNIPPETS('the time has come, the walrus said, to handle many things, including Check vs Checking, but not quite limited to', 'test', '=check', 1 AS query_mode, 2 AS around, 50 AS limit )</sphinxql>
<sphinxql>CALL SNIPPETS('the time has come, the walrus said, to handle many things, including Check vs Checking, but not quite limited to', 'test', 'checking', 1 AS query_mode, 2 AS around, 50 AS limit )</sphinxql>
<sphinxql>CALL SNIPPETS('the time has come, the walrus said, to handle many things, including Check vs Checking, but not quite limited to', 'test', '=checking', 1 AS query_mode, 2 AS around, 50 AS limit )</sphinxql>
<!-- here is going regression no star matches on fast path - words were stemmed -->
<sphinxql>CALL SNIPPETS('check vs checking fast path', 'tstar', 'checki*', 1 AS query_mode, 0 AS limit )</sphinxql>
<sphinxql>CALL SNIPPETS('check vs checking regular path', 'tstar', 'checki*', 1 AS query_mode, 0 AS limit, 1 AS limit_passages )</sphinxql>
<!-- here is going regression no star matches on regular path - words were stemmed -->
<sphinxql>CALL SNIPPETS('time is dying out like everething else here', 'stars', 'dying*', 1 AS query_mode, 20 AS limit )</sphinxql>
<sphinxql>CALL SNIPPETS('time is dying out like everething else here', 'stars', '*dying', 1 AS query_mode, 20 AS limit )</sphinxql>
<sphinxql>CALL SNIPPETS('time is dying out like everething else here', 'stars', '*dying*', 1 AS query_mode, 20 AS limit )</sphinxql>
<!-- here is going regression allow_empty inconsistency, fast vs plain path -->
<sphinxql>CALL SNIPPETS('time is dying out like everething else here', 'test', 'nothing', 1 AS query_mode, 40 AS limit, 1 as allow_empty )</sphinxql>
<sphinxql>CALL SNIPPETS('time is dying out like everething', 'test', 'nothing', 1 AS query_mode, 40 AS limit, 1 as allow_empty )</sphinxql>
<sphinxql>CALL SNIPPETS('time is dying out like everething else here', 'test', 'nothing', 40 AS limit, 1 as allow_empty )</sphinxql>
<sphinxql>CALL SNIPPETS('time is dying out like everething', 'test', 'nothing', 40 AS limit, 1 as allow_empty )</sphinxql>
<!-- regression stripped option at SNIPPET expression -->
<sphinxql><![CDATA[SELECT id, SNIPPET('hello this is a text. And this.', 'this','before_match=<strong id= %PASSAGE_ID% >', 'after_match=</strong>', 'start_passage_id=100000000') from test2 where match ('this')]]></sphinxql>
<sphinxql><![CDATA[CALL SNIPPETS('hello this is a text. And this.', 'test2', 'this', '<strong id=%PASSAGE_ID%>' as before_match, '</strong>' as after_match, 100000000 as start_passage_id)]]></sphinxql>
</sphqueries>
</test>
|