view sphinx.mal @ 0:190b452ce385 default tip

Separated sphinx module out from MonetDB.
author Sjoerd Mullender <sjoerd@acm.org>
date Mon, 20 Feb 2017 10:24:56 +0100 (2017-02-20)
parents
children
line wrap: on
line source
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0.  If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V.

module sphinx;

command searchIndexLimit(q:str, i:str, l:int) :bat[:lng]
address SPHINXsearchIndexLimit
comment "Search the query on the specified index, with limit";

function search(q:str) :bat[:lng];
	ret := searchIndexLimit(q, "*", 20);
	return ret;
end search;

function searchIndex(q:str, i:str) :bat[:lng];
	ret := searchIndexLimit(q, i, 20);
	return ret;
end searchIndex;


function sphinx_search(q:str)(id:bat[:lng]);
	ret := searchIndexLimit(q, "*", 20);
	return ret;
end sphinx_search;

function sphinx_searchIndex(q:str, i:str)(id:bat[:lng]);
	ret := searchIndexLimit(q, i, 20);
	return ret;
end sphinx_searchIndex;

function sphinx_searchIndexLimit(q:str, i:str, l:int)(id:bat[:lng]);
	ret := searchIndexLimit(q, i, l);
	return ret;
end sphinx_searchIndexLimit;