Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Native javascript implementation of the standard Sphinx API
branch: master
Failed to load latest commit information.
lib fix SphinxClient.SEARCHD_ERROR callback bug
.gitignore oups gitignore m a trompé
.npmignore some fix
INSTALL some details
LICENSE some fix
README.md add contributor
index.js bugfix (many, many, ...)
orange.png feu
package.json fix #8
rouge.png feu
vert.png feu

README.md

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.

Contributors

Installation

With npm do:

$ npm install sphinxapi

Examples

Status

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));
})

Query

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));
});

API Documentation

from the official documentation : http://sphinxsearch.com/docs/current.html#api-reference

Porting Status GetLastError()

Porting Status GetLastWarning()

Porting Status SetServer (host, port)

Porting Status SetConnectTimeout (timeout)

Porting Status SetLimits (offset, limit, maxmatches, cutoff)

Porting Status SetMaxQueryTime (maxquerytime)

Porting Status SetMatchMode (mode)

Porting Status SetRankingMode (ranker, rankexpr)

Porting Status SetSortMode (mode, clause)

Porting Status SetWeights (weights)

Porting Status SetFieldWeights (weights)

Porting Status SetIndexWeights (weights)

Porting Status SetIDRange (minid, maxid)

Porting Status SetFilter (attribute, values, exclude)

Porting Status SetFilterRange (attribute, min, max, exclude)

Porting Status SetGeoAnchor (attrlat, attrlong, latitude, longitude)

Porting Status SetGroupBy (attribute, func, groupsort )

Porting Status SetGroupDistinct (attribute)

Porting Status SetRetries (count, delay)

Porting Status SetOverride (name, type, values)

Porting Status SetSelect (select)

Porting Status ResetOverrides ()

Porting Status ResetFilters ()

Porting Status ResetGroupBy ()

Porting Status Query (query, index, comment, fn)

Porting Status AddQuery (query, index, comment)

Porting Status RunQueries (fn)

Porting Status BuildExcerpts (docs, index, words, opts)

Porting Status UpdateAttributes (index, attrs, values, mva)

Porting Status BuildKeywords (query, index, hits )

Porting Status Status (fn)

Porting Status Open ()

Porting Status Close ()

Porting Status EscapeString (string)

Porting Status FlushAttributes ()

Also

License

MIT/X11

Bitdeli Badge

Something went wrong with that request. Please try again.