Native javascript implementation of the standard Sphinx API
JavaScript
Switch branches/tags
Nothing to show
Latest commit 42f4d4b Dec 31, 2016 @touv touv committed on GitHub Merge pull request #26 from reqq/master
add BuildKeywords method
Permalink
Failed to load latest commit information.
lib fix buildKeywords response parsing Dec 19, 2016
.gitignore oups gitignore m a trompé Mar 23, 2012
.npmignore some fix May 16, 2012
INSTALL some details May 16, 2012
LICENSE some fix May 16, 2012
README.md add contributor Apr 20, 2016
index.js bugfix (many, many, ...) Jul 24, 2012
orange.png feu May 14, 2012
package.json 1.2.1 Apr 20, 2016
rouge.png feu May 14, 2012
vert.png feu May 14, 2012

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