Giter Site home page Giter Site logo

khoomelvin / node-sphinxapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from inist-cnrs/node-sphinxapi

0.0 1.0 0.0 167 KB

Native javascript implementation of the standard Sphinx API

Home Page: https://www.npmjs.com/package/sphinxapi

License: Other

JavaScript 100.00%

node-sphinxapi's Introduction

Sphinx Search Client for NodeJS

See ITPatrol repository for the latest developments.

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

node-sphinxapi's People

Contributors

touv avatar kerphi avatar reqq avatar gormartsen avatar johnmarkg avatar biggora avatar bitdeli-chef avatar mdevils avatar shlee322 avatar petermu avatar senxation avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.