<?xml version="1.0" encoding="utf-8"?>
<test>
<name>specials vs charset_table vs match_mode</name>
<config>
indexer
{
	mem_limit			= 16M
}

searchd
{
	<searchd_settings/>
}

source src
{
	type			= mysql
	<sql_settings/>
	sql_query		= SELECT * FROM test_table WHERE document_id IN (1,2,3,4)
}

index main
{
	source			= src
	path			= <data_path/>/main
	charset_table	= 0..9, A..Z->a..z, _, a..z, (, ), $
}

source src_wf
{
	type			= mysql
	<sql_settings/>
	sql_query		= SELECT * FROM test_table WHERE document_id>4
}

index wf1
{
	source			= src_wf
	path			= <data_path/>/wf1
	morphology			= stem_en
	charset_type		= utf-8
	charset_table	= 0..9, A..Z->a..z, a..z,
	wordforms = test_098/wordforms.txt
}

index wf2
{
	source			= src_wf
	path			= <data_path/>/wf2
	morphology			= stem_en
	charset_type		= utf-8
	charset_table	= 0..9, A..Z->a..z, a..z, -
	wordforms = test_098/wordforms.txt
}

source src_wf3
{
	type			= mysql
	<sql_settings/>
	sql_query		= SELECT * FROM test_wf3
}


index wf3
{
	source			= src_wf3
	path			= <data_path/>/wf3
	morphology			= stem_en
	charset_type		= utf-8
	charset_table 	= -, 0..9, A..Z->a..z, _, a..z
	wordforms = test_098/wf3.txt
}

</config>

<queries>
<query index='main'>google$com</query>
<query index='main'>foo(bar)</query>
<query index='main'>foo\(bar\)</query>
<query index='main' mode="extended2">google$com</query>
<query index='main' mode="extended2">foo(bar)</query>
<query index='main' mode="extended2">foo\(bar\)</query>
<query index='main' mode="extended2">"foo(bar)"</query>
<!-- here is going regression (query 8-)  when second index shares wordform from 1st index -->
<query index='wf1' mode="extended2">run</query>
<query index='wf2' mode="extended2">run</query>
<query index='wf1' mode="extended2">run\-time</query>
<query index='wf2' mode="extended2">run\-time</query>
<query index='wf1' mode="extended2">run time</query>
<query index='wf2' mode="extended2">run time</query>
</queries>
<sphqueries>
<sphinxql>CALL KEYWORDS ('run-time (run time) issue', 'wf1')</sphinxql>
<sphinxql>CALL KEYWORDS ('run-time (run time) issue', 'wf2')</sphinxql>
<!-- here is going regression crash on indexing wordforms vs multi-wordforms -->
<sphinxql>SELECT * from wf3 where match ('word2word2')</sphinxql>
</sphqueries>


<db_create>
CREATE TABLE test_table (
	document_id INTEGER NOT NULL PRIMARY KEY,
	title VARCHAR(255) NOT NULL )
</db_create>
<db_create>
CREATE TABLE test_wf3 (
	document_id INTEGER NOT NULL PRIMARY KEY,
	title VARCHAR(255) NOT NULL )
</db_create>
<db_drop>
DROP TABLE IF EXISTS test_table
</db_drop>
<db_drop>
DROP TABLE IF EXISTS test_wf3
</db_drop>
<db_insert>
INSERT INTO test_table VALUES
	( 1, 'google dot com' ),
	( 2, 'foo beyond all bars' ),
	( 3, 'mangled google$com link' ),
	( 4, 'no idea why search for foo(bar), but they do' ),
	( 5, 'run-time error' ),
	( 6, 'running without trouble' )
</db_insert>
<db_insert>
INSERT INTO test_wf3 VALUES
	( 1, 'word2word2 word4word4' )
</db_insert>
</test>