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

<test>
<name>snippets vs NEAR</name>

<config>
searchd
{
	<searchd_settings/>
}

source test
{
	type = mysql
	<sql_settings/>
	sql_query = SELECT 1, 'text';
}

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

	charset_type	= utf-8
}
</config>

<db_insert>select 1;</db_insert>

<custom_test><![CDATA[

$results = array();

$docs = array( 'Was one rabiit. Now there are five rabbits.' );
$opts = array( 'query_mode'=>true, "around"=> 2 );

$results[] = $client->BuildExcerpts($docs, 'test', '(one) NEAR/35 ("five")', $opts );

// regression crash on 0 docs snippet
$results[] = $client->BuildExcerpts(array(), 'test', '(one) NEAR/35 ("five")', $opts );
$results[] = $client->GetLastError();

]]></custom_test>

</test>
