Giter VIP home page Giter VIP logo

node-elastical's People

Stargazers

Angus H. avatar  avatar JT5D avatar  avatar David Higginbotham avatar Eurico Jardim avatar kuno avatar George Shank avatar Kevin Buckley avatar  avatar Bryan Wood avatar Mark Cicoria avatar Narciso avatar Christoph Hartmann avatar l92 avatar Joseph avatar Mirco Zeiss avatar  avatar  avatar Mischosch avatar Daniel  avatar  avatar Ferhat Sobay avatar Israel Gutiérrez avatar mehtryx avatar Nick Tackes avatar lemonhall avatar Gaston Morixe avatar Jacob Michael Lee avatar Jef Armstrong avatar Gabriel Lesperance avatar Smith avatar Daniel Fagnan avatar tomoharu fujita avatar Sven Hohlfeld avatar Scott Sanders avatar Lele avatar John Hewson avatar Alexandru Topliceanu avatar Ram Viswanadha avatar  avatar Kilian Ciuffolo avatar Nicholas Husher avatar Christian Hochfilzer avatar Michael Hart avatar David Miranda avatar Remy Loubradou avatar Tom Elam avatar Charles Davison avatar Nevin Ng avatar Bruno Fernandez-Ruiz avatar Shaun Berryman avatar Justin Cooper avatar Richard Marr avatar Romain avatar Thomas Fritz avatar David Pilato avatar Joshua Stauter avatar Dallan Quass avatar Eric Gaumer avatar matthiasg avatar mt3 avatar tom zhou avatar Olivier Vaillancourt avatar Tiago Alves avatar Lukáš Vlček avatar Jarvis Ao Ieong avatar James Phillips avatar Damien Simonin Feugas avatar Anatoly Geyfman avatar Acácio avatar Vincent Battaglia avatar Andrew Jones avatar Matt Brown avatar Tim Hudson avatar Sveinung Tord Røsaker avatar Brandon Fish avatar Chris Hoffman avatar Rory Fitzpatrick avatar Christian Sanz avatar  avatar Ryan Shaw avatar Christiano Milfont avatar Kotaro Chikuba avatar Kyle Mathews avatar alexander sicular avatar Daniel Poelzleithner avatar Nick Campbell avatar Damien Goujard avatar James Carr avatar Cameron Corda avatar Shay Banon avatar Eric Ferraiuolo avatar Davide Saurino avatar Romain Huet avatar Chris Amico avatar  avatar Michael Grassotti avatar grantmichaels avatar Jonas Grimfelt avatar

Watchers

Ryan Grove avatar tom zhou avatar Art2code avatar James Cloos avatar  avatar Krassimir Fotev avatar  avatar

node-elastical's Issues

How to tell when document is indexed

When the callback from elasticalClient.index() runs, it seems the document has been submitted but not actually indexed yet. This makes running unit tests slightly difficult as we have to insert a setTimeout wait of about a second before running the test.

Is there a method for submitting a callback function that runs once the document is indexed and ready to be searched?

A way to check for existence of an index or river?

Is there a way to check for the existence of a particular index? I found the indexExists() method, however it doesn't seem to be documented or to work as expected. An index name that definitely exists according to the output of a curl call to /_status and /index_name/_status seems to return false when passed to indexExists():

client.indexExists(indexName, function(err, exists) {
    if (err) {
        throw err;
    }

    if (exists) {
        console.log("Exists");
    } else {
        console.log("Doesn't exist");
    }
}); 

DELETE method on requests over SSL

Everything is great with the Auth and SSL...except...

I take fault in this one, none of the test cases run against a server with SSL connection, thats not something you can reliably have in the test cases without a public elasticsearch server you can hit over ssl or a lot more setup locally....sigh.

Essentially however I've discovered a single fault and it is not in the code...it is in the package.json, and the fault is only in that the request library v2.1.1 had an issue when sending DELETE method over ssl, you will get an error 411 Length Required because the request is missing the Content-Length header.

So everything inside elastical works great over ssl, except any request sending the DELETE method, meaning we would need it to be increased. I've tested locally by changing the dependency to "request": "~2.2.0" which installs 2.2.5 and all test cases pass.

I could submit this via a pull request but wanted to see if you had any particular needs for request at 2.1.x

Thanks

Online test failures - bulk (when index Exists) and putMapping (with no index)

I've pulled the latest release from git and ran the test cases, I've been looking at your code to try and work around a problem we have with null data inserting into Elastical....before I start trying things I wanted to make sure the tests all currently passed...I am getting a failure on the bulk and putMapping methods as per below:

~/Documents/gitrepo/node-elastical$ make test
node_modules/.bin/vows tests/offline-tests.js
··················································································· 
✓ OK » 83 honored (0.015s)
node_modules/.bin/vows tests/online-tests.js
·✗··························✗·········· 


 Client bulk() when the index exists
   ✗ should succeed
     » expected true, got undefined // online-tests.js:37

 Client putMapping() with no index
   ✗ should succeed
     » expected null, got {
   stack: 'Error: MergeMappingException[Merge failed with failures {[mapper [message] has different store values]}]\n    at    Error (unknown source)\n    at Request.callback (/Users/kbenedict/Documents/gitrepo/node-elastical/lib/client.js:663:26)\n    at Request.<anonymous> (/Users/kbenedict/Documents/gitrepo/node-elastical/node_modules/request/main.js:314:21)\n    at Request.emit (events.js:64:17)\n    at IncomingMessage.<anonymous> (/Users/kbenedict/Documents/gitrepo/node-elastical/node_modules/request/main.js:295:19)\n    at IncomingMessage.emit (events.js:81:20)\n    at HTTPParser.onMessageComplete (http.js:133:23)\n    at Socket.ondata (http.js:1231:22)\n    at Socket._onReadable (net.js:683:27)\n    at IOWatcher.onReadable [as callback] (net.js:177:10)',
   arguments: undefined,
   type: undefined,
   message: 'MergeMappingException[Merge failed with failures {[mapper [message] has different store values]}]'
} // online-tests.js:379
✗ Broken » 37 honored ∙ 2 broken (0.168s)
make: *** [online-tests] Error 1
~/Documents/gitrepo/node-elastical$ 

One other item to note and I'll tag it in here as it relates to testing. In the teardown script, the last entry has the following:

 curl -s -XDELETE "$BASE/_percolator//elastical-test-percolator-index/elastical-test-percolator-delete"

Note the double forward slash in the url ------------^

Stack trace: <ClientRequest> has no method 'setTimeout'

I'm on Node 0.4.7, and Request 2.9.152 is being pulled in by Elastical, but this new version is failing.

TypeError: Object # has no method 'setTimeout'
at Request.start (/app/node_modules/elastical/node_modules/request/main.js:475:14)
at EventEmitter._tickCallback (node.js:126:26)
at Request.write (/app/node_modules/elastical/node_modules/request/main.js:687:28)
at Array. (/app/node_modules/elastical/node_modules/request/main.js:308:14)

Any ideas? Is this a Request bug?

Error: undefined is not a valid uri or options object. (breakage with [email protected])

I did a fresh npm install with elastical 0.0.7 and an updated request version was pulled down which seems to cause trouble.
Patching the package.json to specify request version "=2.9.1" addressed the issue.

Here's the stack trace I was seeing with request 2.9.2

Error: undefined is not a valid uri or options object.
    at request (project/node_modules/elastical/node_modules/request/main.js:786:41)
    at project/node_modules/elastical/node_modules/request/main.js:810:14
    at Object._request (project/node_modules/elastical/lib/client.js:713:9)
    at Object.search (project/node_modules/elastical/lib/client.js:530:14)

Online tests failing

Hi there. I'm getting 11 failures in the online tests, this is with a clean git clone of https://github.com/rgrove/node-elastical/ and an otherwise apparently operational index running on http://localhost:9200.

✗ Broken » 28 honored ∙ 11 broken (0.425s)

Most of them seem to involve a TypeMissingException on the "_all" type, e.g.

  Client get() options.ignoreMissing when true and the document does not exist
    ✗ should not respond with an error
      » expected null, got {
    stack: 'Error: TypeMissingException[[elastical-test-get] type[_all] missing]
        at Error (unknown source)
        at Request._callback (/Users/richardmarr/Projects/node-elastical/lib/client.js:716:26)
        at Request.callback (/Users/richardmarr/Projects/node-elastical/node_modules/request/main.js:104:22)
        at Request.<anonymous> (/Users/richardmarr/Projects/node-elastical/node_modules/request/main.js:458:18)
        at Request.<anonymous> (events.js:64:17)
        at Request.emit (/Users/richardmarr/Projects/node-elastical/node_modules/vows/lib/vows.js:236:24)
        at IncomingMessage.<anonymous> (/Users/richardmarr/Projects/node-elastical/node_modules/request/main.js:423:16)
        at IncomingMessage.<anonymous> (events.js:81:20)
        at IncomingMessage.emit (/Users/richardmarr/Projects/node-elastical/node_modules/vows/lib/vows.js:236:24)
        at HTTPParser.onMessageComplete (http.js:133:23)',
    arguments: undefined,
    message: 'TypeMissingException[[elastical-test-get] type[_all] missing]',
    type: undefined

This may not actually be an issue that originates in node-elastical, but I thought I'd raise it here first in case you're aware of it.

Compatibility for node v0.8.x?

Right now elastical doesn't work with the latest version of node.js, due to:

"node >=0.4.0 <0.7.0" in packages.json.

Can this line be changed so that it supports node versino 0.8.x?

Push 0.0.10

npm contains release 0.0.10, but the latest on github is 0.0.9. Could you push 0.0.10 to github please?

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.