<?xml version="1.0" encoding="utf-8"?>
<test>

<name>index_exact_words</name>

<config>
indexer
{
	mem_limit		= 16M
}

searchd
{
	<searchd_settings/>
	workers = threads
}

source srctest
{
	type			= mysql
	<sql_settings/>
	sql_query		= SELECT document_id, body FROM test_table
}

index test
{
	source			= srctest
	path			= <data_path/>/test

	<dynamic>
		<variant>index_exact_words = 0</variant>
		<variant>index_exact_words = 1</variant>
	</dynamic>

	<dynamic>
		<variant>morphology = none</variant>
		<variant>morphology = stem_en</variant>
	</dynamic>
}

index rt
{
	type			= rt
	path			= <data_path/>/rt
	rt_field		= title	
	rt_attr_uint	= id1
	index_exact_words = 1
	morphology = stem_en
}
</config>

<queries>
<query mode="extended2" index="test">work</query>
<query mode="extended2" index="test">worked</query>
<query mode="extended2" index="test">worker</query>
<query mode="extended2" index="test">=work</query>
<query mode="extended2" index="test">=worked</query>
<query mode="extended2" index="test">=worker</query>
<query mode="extended2" index="test">run</query>
<query mode="extended2" index="test">runs</query>
<query mode="extended2" index="test">=run</query>
<query mode="extended2" index="test">=runs</query>
</queries>

<sphqueries>
<sphinxql>
REPLACE INTO rt (id, id1, title) VALUES ( 1, 1, 'work worked working workings worker works workers' ),
( 2, 1, 'run' ),
( 3, 1, 'runs' ),
( 4, 1, 'running' )
</sphinxql>
<sphinxql>SELECT * FROM rt WHERE MATCH('work')</sphinxql>
<sphinxql>show meta</sphinxql>
<sphinxql>SELECT * FROM rt WHERE MATCH('worked')</sphinxql>
<sphinxql>show meta</sphinxql>
<sphinxql>SELECT * FROM rt WHERE MATCH('worker')</sphinxql>
<sphinxql>show meta</sphinxql>
<sphinxql>SELECT * FROM rt WHERE MATCH('=work')</sphinxql>
<sphinxql>show meta</sphinxql>
<sphinxql>SELECT * FROM rt WHERE MATCH('=worked')</sphinxql>
<sphinxql>show meta</sphinxql>
<sphinxql>SELECT * FROM rt WHERE MATCH('=worker')</sphinxql>
<sphinxql>show meta</sphinxql>
<sphinxql>SELECT * FROM rt WHERE MATCH('run')</sphinxql>
<sphinxql>show meta</sphinxql>
<sphinxql>SELECT * FROM rt WHERE MATCH('runs')</sphinxql>
<sphinxql>show meta</sphinxql>
<sphinxql>SELECT * FROM rt WHERE MATCH('=run')</sphinxql>
<sphinxql>show meta</sphinxql>
<sphinxql>SELECT * FROM rt WHERE MATCH('=runs')</sphinxql>
<sphinxql>show meta</sphinxql>
</sphqueries>

<db_create>
CREATE TABLE `test_table`
(
	`document_id` int(11) NOT NULL default '0',
	`body` varchar(255) NOT NULL default ''
)
</db_create>

<db_drop>
DROP TABLE IF EXISTS `test_table`
</db_drop>

<db_insert>
INSERT INTO `test_table` VALUES
( 1, 'work worked working workings worker works workers' ),
( 2, 'run' ),
( 3, 'runs' ),
( 4, 'running' )
</db_insert>

</test>
