deogar 3c3560c4c7 fixed year in sources, it is 2015 now 11 years ago
..
COPYING 77478139bf merged from rel098 upto r1371 17 years ago
Makefile.am 77478139bf merged from rel098 upto r1371 17 years ago
Makefile.in 8ed9e28880 merged from rel098 upto r1533 (aka 0.9.8.1-release) 17 years ago
README 77478139bf merged from rel098 upto r1371 17 years ago
build.mk 77478139bf merged from rel098 upto r1371 17 years ago
buildconf.sh 77478139bf merged from rel098 upto r1371 17 years ago
config.guess 8ed9e28880 merged from rel098 upto r1533 (aka 0.9.8.1-release) 17 years ago
config.sub 8ed9e28880 merged from rel098 upto r1533 (aka 0.9.8.1-release) 17 years ago
configure 8ed9e28880 merged from rel098 upto r1533 (aka 0.9.8.1-release) 17 years ago
configure.in e9bc0515d5 merged rel20 branch (upto r3025) back into trunk 14 years ago
install-sh 8ed9e28880 merged from rel098 upto r1533 (aka 0.9.8.1-release) 17 years ago
libsphinxclient.vcproj 77478139bf merged from rel098 upto r1371 17 years ago
ltmain.sh 8ed9e28880 merged from rel098 upto r1533 (aka 0.9.8.1-release) 17 years ago
missing 8ed9e28880 merged from rel098 upto r1533 (aka 0.9.8.1-release) 17 years ago
smoke_ref.txt 5a56d452f8 fixed API smoke test 11 years ago
smoke_test.conf 79e7ee76b0 fixed smoke from last commit 11 years ago
smoke_test.sh 0e24c1d5f2 Smoke dead-loop fixed. A variable renamed. 13 years ago
sphinxclient.c 3c3560c4c7 fixed year in sources, it is 2015 now 11 years ago
sphinxclient.h 3c3560c4c7 fixed year in sources, it is 2015 now 11 years ago
sphinxclient_config.h.in 8ed9e28880 merged from rel098 upto r1533 (aka 0.9.8.1-release) 17 years ago
test.c 3c3560c4c7 fixed year in sources, it is 2015 now 11 years ago
test.sln 279732f086 .sln files should be binary, and crlf 13 years ago
test.vcproj 77478139bf merged from rel098 upto r1371 17 years ago
test03.sln 233bee08a9 rewritten send_word() and sent_int() that work around VS2003 compiler bug 15 years ago
test03.vcproj 233bee08a9 rewritten send_word() and sent_int() that work around VS2003 compiler bug 15 years ago

README

Pure C searchd client API library
Sphinx search engine, http://sphinxsearch.com/

API notes
----------

1. API can either copy the contents of passed pointer arguments,
or rely on the application that the pointer will not become invalid.
This is controlled on per-client basis; see 'copy_args' argument
to the sphinx_create() call.

When 'copy_args' is true, API will create and manage a copy of every
string and array passed to it. This causes additional malloc() pressure,
but makes calling code easier to write.

When 'copy_args' is false, API expects that pointers passed to
sphinx_set_xxx() calls will still be valid at the time when sphinx_query()
or sphinx_add_query() are called.

Rule of thumb: when 'copy_args' is false, do not free query arguments
until you have the search result. Example code for that case:

VALID CODE:

char * my_filter_name;

my_filter_name = malloc ( 256 );
strncpy ( my_filter_name, "test", 256 );

sphinx_add_filter_range ( client, my_filter_name, 10, 20, false );
result = sphinx_query ( client );

free ( my_filter_name );
my_filter_name = NULL;

INVALID CODE:

void setup_my_filter ( sphinx_client * client )
{
char buffer[256];
strncpy ( buffer, "test", sizeof(buffer) );

// INVALID! by the time when sphinx_query() is called,
// buffer will be out of scope
sphinx_add_filter_range ( client, buffer, 10, 20, false );
}

setup_my_filter ( client );
result = sphinx_query ( client );

--eof--