<?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
}

</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>
</sphqueries>

</test>
