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

<requires>
<lemmatizer_base/>
</requires>

<name>aot morphology in utf-8</name>

<config>
common
{
	lemmatizer_base	= <local>lemmatizer_base</local>
}

searchd
{
	<searchd_settings/>
	workers				= threads
}

source test1
{
	type			= mysql
	<sql_settings/>
	sql_query_pre	= set names utf8
	sql_query		= select * from test_table
	sql_attr_uint	= gid
}

index test1
{
	source			= test1
	path			= <data_path/>/test1
	morphology		= lemmatize_ru_all
	blend_chars		= @, .
	wordforms		= <this_test/>/wordforms.txt
}

index test2 : test1
{
	path			= <data_path/>/test2
	morphology		= lemmatize_ru
}

index test3 : test1
{
	path			= <data_path/>/test3
	index_exact_words = 1
	morphology		= stem_en,lemmatize_ru_all
}

index test4 : test1
{
	path			= <data_path/>/test4
	index_exact_words = 1
	morphology		= lemmatize_en_all, stem_ru
}

index testrt1
{
	type			= rt
	path			= <data_path/>/testrt1
	morphology		= lemmatize_ru_all
	blend_chars		= @, .
	wordforms		= <this_test/>/wordforms.txt
	rt_attr_uint	= gid
	rt_field		= title
}

index testrt2 : testrt1
{
	path			= <data_path/>/testrt2
	morphology		= lemmatize_ru
}

source stalin_src
{
	type			= mysql
	<sql_settings/>
	sql_query_pre	= set names utf8
	sql_query		= select * from test_table where id=1000
	sql_attr_uint	= gid
}

index stalin_plain
{
	source			= stalin_src
	path			= <data_path/>/stalin_plain
	morphology		= lemmatize_ru
	min_infix_len	= 2
	expand_keywords	= 1	
}

index stalin_rt
{
	type			= rt
	path			= <data_path/>/stalin_rt
	morphology		= lemmatize_ru_all
	dict			= keywords
	min_infix_len	= 2
	expand_keywords	= 1
	rt_field		= text
	rt_attr_uint	= gid
}

index crash_idx
{
	type			= rt
	path			= <data_path/>/crash_idx
	rt_field		= query
	rt_attr_bigint	= rating
	morphology		= stem_en, lemmatize_ru_all
	wordforms		= <this_test/>/wordforms2.txt
}

source test_wf
{
	type			= mysql
	<sql_settings/>
	sql_query_pre	= set names utf8
	sql_query		= select 1 id, 11 gid, 'камеди full source' UNION select 2 id, 11 gid, 'comedi central' UNION select 3 id, 11 gid, 'pop idol'
	sql_attr_uint	= gid
}

index test_wf1
{
	source			= test_wf
	path			= <data_path/>/test_wf1
	morphology		= stem_en, lemmatize_ru_all
	wordforms		= <this_test/>/wordforms3.txt
	dict                = keywords
	min_prefix_len 		= 2
}
index test_wf2
{
	source			= test_wf
	path			= <data_path/>/test_wf2
	morphology		= stem_en, lemmatize_ru_all
	wordforms		= <this_test/>/wordforms3.txt
	dict                = keywords
}

source test_quorum
{
	type			= mysql
	<sql_settings/>
	sql_query_pre	= set names utf8
	sql_query		= select 1 id, 11 gid,'1' docid,  'Иван Иванович меняет песенка' text UNION select 2 id, 11 gid, '1' docid,  'Иванович песенка' text
	sql_attr_uint	= gid
}

index test_quorum
{
	source			= test_quorum
	path			= <data_path/>/test_quorum
	morphology		= lemmatize_ru_all
	dict                = keywords
	index_exact_words = 1
}

source test_lemmas
{
	type			= mysql
	<sql_settings/>
	sql_query_pre	= set names utf8
	sql_query		= select 1 id, 11 gid,'1' docid,  'так Иван Иванович меняет вот' title, 'Иван Иванович меняет вот' body
	sql_attr_uint	= gid
}

index test_lemmas
{
	source			= test_lemmas
	path			= <data_path/>/test_lemmas
	charset_type	= utf-8
	morphology		= lemmatize_ru_all
	dict            = keywords
}

source test_lemmas1
{
	type			= mysql
	<sql_settings/>
	sql_query_pre	= set names utf8
	sql_query		= select 1 id, 11 gid,'1' docid,  'так Иван Иванович меняет вот.да' title, 'Иван Иванович меняет вот.да' body
	sql_attr_uint	= gid
}

index test_lemmas1
{
	source			= test_lemmas1
	path			= <data_path/>/test_lemmas1
	charset_type	= utf-8
	morphology		= lemmatize_ru_all
	dict            = keywords
	blend_chars		= .
}

source test_lemmas2
{
	type			= mysql
	<sql_settings/>
	sql_query_pre	= set names utf8
	sql_query		= select 1 id, 11 gid,'1' docid,  'так Иван Иванович меняет да.вот' title, 'Иван Иванович меняет да.вот' body
	sql_attr_uint	= gid
}

index test_lemmas2
{
	source			= test_lemmas2
	path			= <data_path/>/test_lemmas2
	charset_type	= utf-8
	morphology		= lemmatize_ru_all
	dict            = keywords
	blend_chars		= .
}

source src_stop10
{
	type			= mysql
	<sql_settings/>
	sql_query		= SELECT 1, 11 as idd, 'поглазова ответы' as text UNION SELECT 2, 22 as idd, 'kPMHkQCFrL' as text
	sql_query_pre = SET NAMES utf8
	sql_attr_uint = idd
}

index test_stop10
{
	source			= src_stop10
	path			= <data_path/>/test_stop10
	dict			= keywords
	charset_type 	= utf-8
	charset_table 	= 0..9, A..Z->a..z, _, ., -, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F, U+0401->U+0435, U+0451->U+0435 
	morphology 		= lemmatize_ru_all, stem_enru
	index_exact_words = 1
}

source src_all11
{
	type			= mysql
	<sql_settings/>
	sql_query		= SELECT 1, 11 as idd, 'секс' as text UNION SELECT 2, 22 as idd, 'себульба' as text
	sql_query_pre = SET NAMES utf8
	sql_attr_uint = idd
}

index test_all11
{
	source			= src_all11
	path			= <data_path/>/test_all11
	dict			= keywords
	charset_type 	= utf-8
	charset_table 	= 0..9, A..Z->a..z, _, ., -, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F, U+0401->U+0435, U+0451->U+0435 
	morphology 		= lemmatize_ru_all, stem_enru
	min_prefix_len	= 2
	enable_star		= 1
}

source test_en_all
{
	type			= mysql
	<sql_settings/>
	sql_query_pre	= set names utf8
	sql_query		= select 1 id, 11 idd, 'told me stops' body
	sql_attr_uint	= idd
}


index test_en_all
{
	source			= test_en_all
	dict			= keywords
	path			= <data_path/>/test_en_all
	morphology		= lemmatize_en_all
}

index test_en_all1
{
	source			= test_en_all
	dict			= keywords
	path			= <data_path/>/test_en_all1
	morphology		= lemmatize_en_all
	index_exact_words = 1
}

</config>

<db_create>
CREATE TABLE test_table
(
	id INTEGER PRIMARY KEY NOT NULL,
	gid INTEGER NOT NULL,
	title VARCHAR(255) CHARACTER SET utf8 NOT NULL
);
</db_create>
<db_drop>DROP TABLE IF EXISTS test_table</db_drop>
<db_insert>SET NAMES utf8</db_insert>
<db_insert>INSERT INTO test_table VALUES
	( 1, 11, 'они стали есть' ),
	( 2, 11, 'Крыса из Нержавеющей Стали' ),
	( 3, 11, 'воруй@убивай' ),
	( 4, 11, 'воровал' ),
	( 5, 11, 'убиваю' ),
	( 6, 11, 'вокзал г.Зажопинска' ),
	( 7, 11, 'бросить бы все, да в Зажопинск' ),
	( 8, 11, 'Лучшая рыба это колбаса!' ),
	( 9, 11, 'косой шакал' ),
	( 10, 11, 'косая линия' ),
	( 11, 11, 'длинная коса' ),
	( 12, 11, 'для __лицо' ),
	( 13, 11, 'длить __лица' ),
	( 14, 11, 'глава12раздел' ),
	( 15, 11, 'попил клейстера' ),
	( 16, 11, 'понюхал клея' ),
	( 17, 11, 'Ё моё' ),
	( 18, 11, 'я санктение люблю спб' ),
	( 1000, 11, 'сталин начал курить' ),
	( 1001, 11, 'Фичин баг' ),
    ( 1002, 11, 'english text' )
</db_insert>
<metaindex name='META:plain'>
<index>test1</index>
<index>test2</index>
<index>test3</index>
</metaindex>

<sphqueries>
<sphinxql>SELECT * FROM test1 WHERE MATCH('сталь')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('стать')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('сталью')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('стали')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('"они стали"')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('воруй@убивай')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('воровать')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('убивать')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('воруй')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('убивай')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('Зажопинск')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('Зажопинска')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('"вокзал г зажопинск"')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('рыба')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('селедка')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('косой')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('косая')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('для')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('длить')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('__лицо')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('__лица')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('глава12раздел')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('клейстеру')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('клей')</sphinxql>
<sphinxql>SELECT * FROM test1 WHERE MATCH('ё')</sphinxql>

<sphinxql>SELECT * FROM test2 WHERE MATCH('сталь')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('стать')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('сталью')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('стали')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('"они стали"')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('воруй@убивай')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('воровать')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('убивать')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('воруй')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('убивай')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('Зажопинск')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('Зажопинска')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('"вокзал г зажопинск"')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('рыба')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('селедка')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('косой')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('косая')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('для')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('длить')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('__лицо')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('__лица')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('глава12раздел')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('клейстеру')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('клей')</sphinxql>
<sphinxql>SELECT * FROM test2 WHERE MATCH('ё')</sphinxql>


<sphinxql>SELECT id,gid,weight() as my_weight FROM META:plain WHERE MATCH('Фичин баг') option ranker=SPH04;show meta</sphinxql>
<sphinxql>SELECT id,gid,weight() as my_weight FROM META:plain WHERE MATCH('Фичин баг');show meta</sphinxql>
<sphinxql>SELECT id,gid,weight() as my_weight FROM META:plain WHERE MATCH('^Фичин баг$');show meta</sphinxql>
<sphinxql>SELECT id,gid,weight(),packedfactors() as my_weight FROM META:plain WHERE MATCH('Фичин баг') option ranker=expr('sum((4*lcs+2*(min_hit_pos==1)+exact_hit)*user_weight)*1000+bm25');show meta</sphinxql>
<sphinxql>SELECT id,gid,weight(),packedfactors() as my_weight FROM META:plain WHERE MATCH('"Фичин баг"') option ranker=expr('sum((4*lcs+2*(min_hit_pos==1)+exact_hit)*user_weight)*1000+bm25');show meta</sphinxql>
<sphinxql>SELECT id,gid,weight(),packedfactors() as my_weight FROM META:plain WHERE MATCH('english text') option ranker=expr('sum((4*lcs+2*(min_hit_pos==1)+exact_hit)*user_weight)*1000+bm25');show meta</sphinxql>
<sphinxql>SELECT id,gid,weight(),packedfactors() as my_weight FROM META:plain WHERE MATCH('"english text"') option ranker=expr('sum((4*lcs+2*(min_hit_pos==1)+exact_hit)*user_weight)*1000+bm25');show meta</sphinxql>

<sphinxql>INSERT INTO testrt1 VALUES ( 1, 'они стали есть', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt1 VALUES ( 2, 'Крыса из Нержавеющей Стали', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt1 VALUES ( 3, 'воруй@убивай', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt1 VALUES ( 4, 'воровал', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt1 VALUES ( 5, 'убиваю', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt1 VALUES ( 6, 'вокзал г.Зажопинска', 11)</sphinxql>
<sphinxql>INSERT INTO testrt1 VALUES ( 7, 'бросить бы все, да в Зажопинск', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt1 VALUES ( 8, 'Лучшая рыба это колбаса!', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt1 VALUES ( 9, 'косой шакал', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt1 VALUES ( 10, 'косая линия', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt1 VALUES ( 11, 'длинная коса', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt1 VALUES ( 12, 'для __лицо', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt1 VALUES ( 13, 'длить __лица', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt1 VALUES ( 14, 'глава12раздел', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt1 VALUES ( 15, 'попил клейстера', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt1 VALUES ( 16, 'понюхал клея', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt1 VALUES ( 17, 'Ё моё', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt1 VALUES ( 18, 'я санктение люблю спб', 11 )</sphinxql>

<sphinxql>SELECT * FROM testrt1 WHERE MATCH('сталь')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('стать')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('сталью')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('стали')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('"они стали"')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('воруй@убивай')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('воровать')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('убивать')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('воруй')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('убивай')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('Зажопинск')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('Зажопинска')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('"вокзал г зажопинск"')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('рыба')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('селедка')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('косой')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('косая')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('для')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('длить')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('__лицо')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('__лица')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('глава12раздел')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('клейстеру')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('клей')</sphinxql>
<sphinxql>SELECT * FROM testrt1 WHERE MATCH('ё')</sphinxql>

<sphinxql>INSERT INTO testrt2 VALUES ( 1, 'они стали есть', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt2 VALUES ( 2, 'Крыса из Нержавеющей Стали', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt2 VALUES ( 3, 'воруй@убивай', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt2 VALUES ( 4, 'воровал', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt2 VALUES ( 5, 'убиваю', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt2 VALUES ( 6, 'вокзал г.Зажопинска', 11)</sphinxql>
<sphinxql>INSERT INTO testrt2 VALUES ( 7, 'бросить бы все, да в Зажопинск', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt2 VALUES ( 8, 'Лучшая рыба это колбаса!', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt2 VALUES ( 9, 'косой шакал', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt2 VALUES ( 10, 'косая линия', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt2 VALUES ( 11, 'длинная коса', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt2 VALUES ( 12, 'для __лицо', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt2 VALUES ( 13, 'длить __лица', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt2 VALUES ( 14, 'глава12раздел', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt2 VALUES ( 15, 'попил клейстера', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt2 VALUES ( 16, 'понюхал клея', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt2 VALUES ( 17, 'Ё моё', 11 )</sphinxql>
<sphinxql>INSERT INTO testrt2 VALUES ( 18, 'я санктение люблю спб', 11 )</sphinxql>

<sphinxql>SELECT * FROM testrt2 WHERE MATCH('сталь')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('стать')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('сталью')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('стали')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('"они стали"')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('воруй@убивай')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('воровать')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('убивать')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('воруй')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('убивай')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('Зажопинск')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('Зажопинска')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('"вокзал г зажопинск"')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('рыба')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('селедка')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('косой')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('косая')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('для')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('длить')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('__лицо')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('__лица')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('глава12раздел')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('клейстеру')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('клей')</sphinxql>
<sphinxql>SELECT * FROM testrt2 WHERE MATCH('ё')</sphinxql>

<sphinxql>REPLACE INTO stalin_rt VALUES ( 1000, 'сталин начал курить', 11 )</sphinxql>
<sphinxql>SELECT * FROM stalin_rt WHERE MATCH('стали')</sphinxql>
<sphinxql>SELECT * FROM stalin_plain WHERE MATCH('стали')</sphinxql>
<sphinxql>SELECT * FROM stalin_plain WHERE MATCH('стали') ORDER BY id ASC, gid ASC</sphinxql>

<!--regression exact form vs missed lemma -->
<sphinxql>SELECT id,gid,weight() as my_weight FROM META:plain WHERE MATCH('=english =text') option ranker=sph04;show meta</sphinxql>
<sphinxql>SELECT id,gid,weight() as my_weight FROM test4 WHERE MATCH('клея') option ranker=sph04;show meta</sphinxql>
<sphinxql>SELECT id,gid,weight() as my_weight FROM test4 WHERE MATCH('=клея') option ranker=sph04;show meta</sphinxql>

<!-- expand+remove quorum dupes test -->
<sphinxql>SELECT id FROM stalin_plain WHERE MATCH('"один два три"/0.5') limit 1</sphinxql>
<sphinxql>SHOW META</sphinxql>

<sphinxql>SELECT id FROM crash_idx WHERE MATCH('"DOG 13"')</sphinxql>

<!--regression wordforms at different stages vs AOT -->
<sphinxql>SELECT id,gid,weight() w FROM test_wf1 WHERE MATCH('камеди');show meta</sphinxql>
<sphinxql>SELECT id,gid,weight() w FROM test_wf2 WHERE MATCH('камеди');show meta</sphinxql>
<sphinxql>SELECT id,gid,weight() w FROM test_wf1 WHERE MATCH('comedi');show meta</sphinxql>
<sphinxql>SELECT id,gid,weight() w FROM test_wf2 WHERE MATCH('comedi');show meta</sphinxql>
<sphinxql>SELECT id,gid,weight() w FROM test_wf1 WHERE MATCH('pop');show meta</sphinxql>
<sphinxql>SELECT id,gid,weight() w FROM test_wf2 WHERE MATCH('pop');show meta</sphinxql>

<!--regression quorum vs AOT -->
<sphinxql>SELECT id  FROM test_quorum WHERE MATCH(' "меняет песенка Иван"/2 (@docid 1)');show meta</sphinxql>

<sphinxql>SET profiling=1</sphinxql>
<sphinxql>SELECT id, WEIGHT() FROM test1 WHERE MATCH('^ попил $');</sphinxql>
<sphinxql>SHOW PLAN;</sphinxql>
<sphinxql>SELECT id, WEIGHT() FROM test1 WHERE MATCH('попил');</sphinxql>
<sphinxql>SHOW PLAN;</sphinxql>
<sphinxql>SELECT id, WEIGHT() FROM test1 WHERE MATCH('попил^1.234');</sphinxql>
<sphinxql>SHOW PLAN;</sphinxql>
<sphinxql>SELECT id, WEIGHT() FROM test1 WHERE MATCH('попил$^1.234');</sphinxql>
<sphinxql>SHOW PLAN;</sphinxql>
<sphinxql>SELECT id, WEIGHT() FROM test1 WHERE MATCH('попил^1.234$');</sphinxql>
<sphinxql>SHOW PLAN;</sphinxql>

<!--regression lemmas vs tail hit -->
<sphinxql>SELECT *, weight() w FROM test_lemmas WHERE MATCH('вот'); show meta</sphinxql>
<sphinxql>SELECT *, weight() w FROM test_lemmas WHERE MATCH('@title вот'); show meta</sphinxql>
<sphinxql>SELECT *, weight() w FROM test_lemmas WHERE MATCH('@body вот'); show meta</sphinxql>
<sphinxql>SELECT *, weight() w FROM test_lemmas1 WHERE MATCH('вот'); show meta</sphinxql>
<sphinxql>SELECT *, weight() w FROM test_lemmas1 WHERE MATCH('@title вот'); show meta</sphinxql>
<sphinxql>SELECT *, weight() w FROM test_lemmas1 WHERE MATCH('@body вот'); show meta</sphinxql>
<sphinxql>SELECT *, weight() w FROM test_lemmas1 WHERE MATCH('вот.да'); show meta</sphinxql>
<sphinxql>SELECT *, weight() w FROM test_lemmas1 WHERE MATCH('(@title вот.да)'); show meta</sphinxql>
<sphinxql>SELECT *, weight() w FROM test_lemmas1 WHERE MATCH('(@body вот.да)'); show meta</sphinxql>
<sphinxql>SELECT *, weight() w FROM test_lemmas2 WHERE MATCH('вот'); show meta</sphinxql>
<sphinxql>SELECT *, weight() w FROM test_lemmas2 WHERE MATCH('@title вот'); show meta</sphinxql>
<sphinxql>SELECT *, weight() w FROM test_lemmas2 WHERE MATCH('@body вот'); show meta</sphinxql>
<sphinxql>SELECT *, weight() w FROM test_lemmas2 WHERE MATCH('да.вот'); show meta</sphinxql>
<sphinxql>SELECT *, weight() w FROM test_lemmas2 WHERE MATCH('(@title да.вот)'); show meta</sphinxql>
<sphinxql>SELECT *, weight() w FROM test_lemmas2 WHERE MATCH('(@body да.вот)'); show meta</sphinxql>

<!-- regression exceptions vs no hits -->
<sphinxql>SELECT *, weight() w FROM test_stop10 WHERE MATCH('поглазова')</sphinxql>
<sphinxql>SELECT *, weight() w FROM test_stop10 WHERE MATCH('kPMHkQCFrL')</sphinxql>

<!-- regression missed index_exact_words vs morphology and substring -->
<sphinxql>SELECT *, weight() w FROM test_all11 WHERE MATCH('се*'); show meta</sphinxql>
<sphinxql>SELECT *, weight() w FROM test_all11 WHERE MATCH('^се*'); show meta</sphinxql>

<!-- regression missed index_exact_words vs lemmatizer_all -->
<sphinxql>SELECT id FROM test_en_all WHERE MATCH('told me'); show meta</sphinxql>
<sphinxql>SELECT id FROM test_en_all WHERE MATCH('=stops'); show meta</sphinxql>
<sphinxql>SELECT id FROM test_en_all WHERE MATCH('=stop'); show meta</sphinxql>
<sphinxql>SELECT id FROM test_en_all WHERE MATCH('stops'); show meta</sphinxql>
<sphinxql>SELECT id FROM test_en_all WHERE MATCH('stop'); show meta</sphinxql>
<sphinxql>SELECT id FROM test_en_all1 WHERE MATCH('=stops'); show meta</sphinxql>
<sphinxql>SELECT id FROM test_en_all1 WHERE MATCH('=stop'); show meta</sphinxql>
<sphinxql>SELECT id FROM test_en_all1 WHERE MATCH('stops'); show meta</sphinxql>
<sphinxql>SELECT id FROM test_en_all1 WHERE MATCH('stop'); show meta</sphinxql>

</sphqueries>

</test>
