Sphinx Search Client for NodeJS
It's native javascript implementation of the standard Sphinx API. The API is totaly similar with the others API clients
implementation. It's also respects NodeJS code convention.
This implementation is based on the Python Official Sphinx Client.
With npm do:
var SphinxClient = require ( "sphinxapi" ) ,
util = require ( 'util' ) ,
assert = require ( 'assert' ) ;
var cl = new SphinxClient ( ) ;
cl . SetServer ( 'localhost' , 19312 ) ;
cl . Status ( function ( err , result ) {
assert . ifError ( err ) ;
console . log ( util . inspect ( result , false , null , true ) ) ;
} )
var SphinxClient = require ( "sphinxapi" ) ,
util = require ( 'util' ) ,
assert = require ( 'assert' ) ;
var cl = new SphinxClient ( ) ;
cl . SetServer ( 'localhost' , 19312 ) ;
cl . Query ( 'test' , function ( err , result ) {
assert . ifError ( err ) ;
console . log ( util . inspect ( result , false , null , true ) ) ;
} ) ;
from the official documentation : http://sphinxsearch.com/docs/current.html#api-reference
GetLastError()
GetLastWarning()
SetServer (host, port)
SetConnectTimeout (timeout)
SetLimits (offset, limit, maxmatches, cutoff)
SetMaxQueryTime (maxquerytime)
SetMatchMode (mode)
SetRankingMode (ranker, rankexpr)
SetSortMode (mode, clause)
SetWeights (weights)
SetFieldWeights (weights)
SetIndexWeights (weights)
SetIDRange (minid, maxid)
SetFilter (attribute, values, exclude)
SetFilterRange (attribute, min, max, exclude)
SetGeoAnchor (attrlat, attrlong, latitude, longitude)
SetGroupBy (attribute, func, groupsort )
SetGroupDistinct (attribute)
SetRetries (count, delay)
SetOverride (name, type, values)
SetSelect (select)
ResetOverrides ()
ResetFilters ()
ResetGroupBy ()
Query (query, index, comment, fn)
AddQuery (query, index, comment)
RunQueries (fn)
BuildExcerpts (docs, index, words, opts)
UpdateAttributes (index, attrs, values, mva)
BuildKeywords (query, index, hits )
Status (fn)
Open ()
Close ()
EscapeString (string)
FlushAttributes ()
MIT/X11