Git Product home page Git Product logo

reds's Introduction

reds

reds is a light-weight Redis search for node.js. This module was originally developed to provide search capabilities for Kue a priority job queue, however it is very much a light general purpose search library that could be integrated into a blog, a documentation server, etc.

Upgrading

Version 1.0.0 is syntactically compatible with previous versions of reds (0.2.5). However, natural has been updated. Documents indexed with older installs of reds (using natural v0.2.0) may need to be re-indexed to avoid some edge cases.

Installation

  $ npm install reds

Example

The first thing you'll want to do is create a Search instance, which allows you to pass a key, used for namespacing within Redis so that you may have several searches in the same db. You may specify your own node_redis instance with the reds.setClient function.

var search = reds.createSearch('pets');

reds acts against arbitrary numeric or string based ids, so you could utilize this library with essentially anything you wish, even combining data stores. The following example just uses an array for our "database", containing some strings, which we add to reds by calling Search#index() padding the body of text and an id of some kind, in this case the index.

var strs = [];
strs.push('Tobi wants four dollars');
strs.push('Tobi only wants $4');
strs.push('Loki is really fat');
strs.push('Loki, Jane, and Tobi are ferrets');
strs.push('Manny is a cat');
strs.push('Luna is a cat');
strs.push('Mustachio is a cat');

strs.forEach(function(str, i){ search.index(str, i); });

To perform a query against reds simply invoke Search#query() with a string, and pass a callback, which receives an array of ids when present, or an empty array otherwise.

search
  .query(query = 'Tobi dollars', function(err, ids){
    if (err) throw err;
    console.log('Search results for "%s":', query);
    ids.forEach(function(id){
      console.log('  - %s', strs[id]);
    });
    process.exit();
  });

By default reds performs an intersection of the search words. The previous example would yield the following output since only one string contains both "Tobi" and "dollars":

Search results for "Tobi dollars":
  - Tobi wants four dollars

We can tweak reds to perform a union by passing either "union" or "or" to Search#type() in reds.search() between Search#query() and Search#end(), indicating that any of the constants computed may be present for the id to match.

search
  .query(query = 'tobi dollars')
  .type('or')
  .end(function(err, ids){
    if (err) throw err;
    console.log('Search results for "%s":', query);
    ids.forEach(function(id){
      console.log('  - %s', strs[id]);
    });
    process.exit();
  });

The union search would yield the following since three strings contain either "Tobi" or "dollars":

Search results for "tobi dollars":
  - Tobi wants four dollars
  - Tobi only wants $4
  - Loki, Jane, and Tobi are ferrets

API

reds.createSearch(key)
Search#index(text, id[, fn])
Search#remove(id[, fn]);
Search#query(text[, type][, fn]); // will return a `Query` instance

Query#between(start, stop)
Query#type(type)
Query#end(fn)

Examples:

var search = reds.createSearch('misc');
search.index('Foo bar baz', 'abc');
search.index('Foo bar', 'bcd');
search.remove('bcd');
search.query('foo bar').end(function(err, ids){});

Extending reds

Starting in 1.0.0, you can easily extend and expand how reds functions. When creating a new search, supply an object as the second argument. There are currently three properties that can be configured:

  • nlpProcess the natural language processing function. You can alter how the words are processed (split, stemmed, and converted to metaphones) using this function.
  • writeIndex how the items are written to the index.
  • removeIndex how the items are removed from the index.

See the lib/reds.js file for the implementation of each. Please keep in mind that changing these functions may invalidate your previously stored index.

reds.createSearch('pets', {
  nlpProcess  : yourNlpProcessingFunction,
  writeIndex  : yourWriteIndexFunction,
  removeIndex : yourRemoveIndexFunction
});

About

Currently reds strips stop words and applies the metaphone and porter stemmer algorithms to the remaining words before mapping the constants in Redis sets. For example the following text:

Tobi is a ferret and he only wants four dollars

Converts to the following constant map:

{
  Tobi: 'TB',
  ferret: 'FRT',
  wants: 'WNTS',
  four: 'FR',
  dollars: 'DLRS'
}

This also means that phonetically similar words will match, for example "stefen", "stephen", "steven" and "stefan" all resolve to the constant "STFN". Reds takes this further and applies the porter stemming algorithm to "stem" words, for example "counts", and "counting" become "count".

Consider we have the following bodies of text:

Tobi really wants four dollars
For some reason tobi is always wanting four dollars

The following search query will then match both of these bodies, and "wanting", and "wants" both reduce to "want".

tobi wants four dollars

Benchmarks

Nothing scientific but preliminary benchmarks show that a small 1.6kb body of text is currently indexed in ~6ms, or 163 ops/s. Medium bodies such as 40kb operate around 6 ops/s, or 166ms.

Querying with a multi-word phrase, and an index containing ~3500 words operates around 5300 ops/s. Not too bad.

If working with massive documents, you may want to consider adding a "keywords" field, and simply indexing it's value instead of multi-megabyte documents.

License

(The MIT License)

Copyright (c) 2011 TJ Holowaychuk <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

reds's People

Contributors

7anshuai avatar barisusakli avatar forbeslindesay avatar gurpartap avatar jonathanong avatar kbsanders avatar kievechua avatar kirilltemnov avatar kyle-test-alt avatar leesolutions avatar mrdnk avatar nisaacson avatar stockholmux avatar tj avatar trevorgerhardt avatar you-think-you-are-special avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reds's Issues

Advanced search

Is it possible to search using operators like AND, OR, -??

Example: 'cars and bikes', 'dogs or cats', 'bike -motorbike'

leak of 'result' from natural 0.0.27

Hey TJ,

I'm using mocha to test some code that uses reds. It fails due to a leak of 'result'. The error is in the component natural, which you have pinned to version 0.0.27. It looks like later versions of natural have undergone significant refactoring, so I couldn't quickly tell whether later versions have fixed the leak. But you may be sticking with 0.0.27 because of API changes.

I'll disable the warning of the leak of 'result' on the mocha command line, which should be all I need for now. But I thought you should at least be aware of this issue.

Jim

Towards a pluggable Reds

This module, in my mind, is at stable state. It's quick, it works well generally and has a good number of depending modules (especially since it is used in Kue).

There is a lot that can be done with the basic structure and it can be monkey patched for extended functionality, but this comes with baggage and is not ideal. There have been a few good PRs that have requested extended and tweaked functionality but perhaps those PRs wouldn't make sense for all. I'm proposing keeping the functionality the same but making reds more extensible and pluggable. I'd like to kick this process off by opening the floor to ideas on how to accomplish this in the most flexible and performant way.

My initial thoughts on the areas of plugablity:

  • index / remove
  • natural language functions (stem / metaphone / stop words, etc.)
  • search query

The plugins could be introduced when creating the new search with an optional config object. It might look something like this:

var search = reds.createSearch('my-search', { indexRemovePlugin : myIndexRemovePlugin })

Thoughts on this idea? Have I missed something?

Crash with exports.stripStopWords

            throw err;
                  ^
TypeError: Cannot read property 'length' of null
    at Object.exports.stripStopWords (/var/www/dev/public_html/baris/node-forum/node_modules/reds/lib/reds.js:113:42)
    at Search.index (/var/www/dev/public_html/baris/node-forum/node_modules/reds/lib/reds.js:282:36)
    at /var/www/dev/public_html/baris/node-forum/src/posts.js:425:14
    at /var/www/dev/public_html/baris/node-forum/src/posts.js:141:5
    at try_callback (/var/www/dev/public_html/baris/node-forum/node_modules/redis/index.js:532:9)
    at RedisClient.return_reply (/var/www/dev/public_html/baris/node-forum/node_modules/redis/index.js:614:13)
    at ReplyParser.<anonymous> (/var/www/dev/public_html/baris/node-forum/node_modules/redis/index.js:266:14)
    at ReplyParser.EventEmitter.emit (events.js:95:17)
    at ReplyParser.send_reply (/var/www/dev/public_html/baris/node-forum/node_modules/redis/lib/parser/javascript.js:300:10)
    at ReplyParser.execute (/var/www/dev/public_html/baris/node-forum/node_modules/redis/lib/parser/javascript.js:203:22)
DEBUG: Program node app exited with code 8

exports.words returns null if it is passed "<-- .".

Parallel createSearch

This code:

var strs = [];
strs.push('Tobi wants four dollars');
strs.push('Tobi only wants $4');
strs.push('Loki is really fat');
strs.push('Loki, Jane, and Tobi are ferrets');
strs.push('Manny is a cat');
strs.push('Luna is a cat');
strs.push('Mustachio is a cat');

const key = 'pets'

redsearch.createSearch(key, {}, (err, search) => {
    search.remove("hola")
})

redsearch.createSearch(key, {}, (err, search) => {
  if (err) console.log(err)
  strs.forEach(function (str, i) { search.index(str, "hola"); });
});

redsearch.createSearch(key, {}, (err, search) => {
    search
    .query('cat* mus*')
    .type('direct')
    .end(function (err, ids) {
      if (err) throw err;
      ids.forEach(function (id) {
        console.log('  - %s', id);
      });
    });
})

Drop this error when the index is not created (the fisrt time):

ReplyError: Index already exists. Drop it first!
    at parseError (/srv/test/node_modules/redis-parser/lib/parser.js:193:12)
    at parseType (/srv/test/node_modules/redis-parser/lib/parser.js:303:14) {
  command: 'FT.CREATE',
  args: [ 'pets', 'SCHEMA', 'payload', 'text' ]
}

I found some workaround grouping the callbacks:

...
const key = 'pets'

let cbks = []
function create(key, cbk) {
    cbks.push(cbk)
    if (cbks.length > 1) return;

    redsearch.createSearch(key, {}, (err, search) => {
        if (err) console.log(err)
        for (let cll of cbks) {
            cll(search)
        }
        cbks = []
    })
}

create(key, (search) => {
    search.remove("hola")
})

create(key, (search) => {
    strs.forEach(function (str, i) { search.index(str, "hola"); });
})

create(key, (search) => {
    search
        .query('cat* mus*')
        .type('direct')
        .end(function (err, ids) {
            if (err) throw err;
            ids.forEach(function (id) {
                console.log('  - %s', id);
            });
        });
})

intersection results, or operator not applied

Hi, I like this engine, small, powerful and smart.

I am only having one issue, it is when I apply the 'or' operator at the end of query, it is not taken into account:

Example:

function whipCream(caba) {
  candysearch
    .query(ingredients)
    .end(function(err, candies){
      if (err || candies.length == 0) {
        console.log("Error with search for cream.", err);
        return caba();
      }
      else {
        var candy_count = candies.length, c=0;
        (candy_count > limit) ? return_size = limit : return_size = candy_count;
        candies.sort(function(a,b){return a-b});
        while (c < return_size) {
          mdb.hgetall("superhotcandy:"+candies[c]);
          c++;          
          if (c == return_size) {
            mdb.exec(function(error, sweetness) {
              console.log(error);
              return caba(sweetness);
            });   
          }          
        }
      }
  }, 'or');
}

When searching for two words only returns if the algorithms match both words, not just one.

Can't install reds on windows 8

Hello,

I am having trouble installing reds on windows 8. When I run "npm install reds", I get the following error:

C:\...\node_modules\reds\node_modules\redis\node_modules\hiredis\build\bindings.sln:

 Solution file error MSB5004: The solution file has two projects named "hiredis".

Connect to a redis server that is not localhost

I'd like to connect to my redis server that lives on another box. I see in the redis plugin you can pass the host in when you call redis.createClient(port, host, options)

What I am trying to figure out is what the best way to do this would be for reds. Excited to kick the tires.

Not Returning Results

If I have the word Michael Clarke indexed and search for this term using

M
Mi
Mic (returns result)
Mich
Micha
Michae
Michael
Michael C
Michael Cl
Michael Cla
Michael Clar
Michael Clark (returns result)
Michael Clarke (returns result)

should return Michael Clarke I am assuming, much like what happens in Facebook search.
However, that is not the case.
When I enter have Mic, Michael Clarke is returned when I add one more letter i.e. Mich nothing is returned; I would have to enter the full name Michael for it to be returned again.

Further to that nothing is returned until I type Michael Clark.

Is this how reds suppose to work, is there a set of options I can change to "tweek" this behavior?

'or' documentation incorrect.

The docs say:

We can tweak reds to perform a union by passing either "union" or "or" to reds.search() after the callback, indicating that any of the constants computed may be present for the id to match.

and show this in the following example. However looking at the code I can't see how this can work. Further it appears as though query(..).type('or').end(..) is the way to perform an 'or' search.

Related to the type() function is between() which also isn't documented.

Help with alternative data storage

Hi, I was wondering if I could get an example of how to make a search index in something other than Redis. Specifically I'm hoping to put the index data into a normal Javascript object.

I see that I need to override reds.createClient(), and that the object that is returned needs to implement a multi() function and zrevrangebyscore() function. But I don't know exactly what those functions should do, or if the object needs implement anything else.

Thanks for you help!

unpin dependencies

this is used by kue. redis is super old and requires hiredis. hiredis doesn't support iojs. i want to upgrade to iojs, but my app currently uses kue. my life sucks. plz unpin redis so at least hiredis is not included.

thx :D

Can reds support fuzzy searching?

For example ,index three words "abcde","bcdefg","abcd". Then i search "abc" get the result "abcde" "abcd" or when i search "cde" get the result "abcde" "bcdefg"

[stockholmux/redredisearch] Parallel createSearch

PROJECT: https://github.com/stockholmux/redredisearch

This code:

var strs = [];
strs.push('Tobi wants four dollars');
strs.push('Tobi only wants $4');
strs.push('Loki is really fat');
strs.push('Loki, Jane, and Tobi are ferrets');
strs.push('Manny is a cat');
strs.push('Luna is a cat');
strs.push('Mustachio is a cat');

const key = 'pets'

redsearch.createSearch(key, {}, (err, search) => {
    search.remove("hola")
})

redsearch.createSearch(key, {}, (err, search) => {
  if (err) console.log(err)
  strs.forEach(function (str, i) { search.index(str, "hola"); });
});

redsearch.createSearch(key, {}, (err, search) => {
    search
    .query('cat* mus*')
    .type('direct')
    .end(function (err, ids) {
      if (err) throw err;
      ids.forEach(function (id) {
        console.log('  - %s', id);
      });
    });
})

Drop this error when the index is not created (the fisrt time):

ReplyError: Index already exists. Drop it first!
    at parseError (/srv/test/node_modules/redis-parser/lib/parser.js:193:12)
    at parseType (/srv/test/node_modules/redis-parser/lib/parser.js:303:14) {
  command: 'FT.CREATE',
  args: [ 'pets', 'SCHEMA', 'payload', 'text' ]
}

I found some workaround grouping the callbacks:

...
const key = 'pets'

let cbks = []
function create(key, cbk) {
    cbks.push(cbk)
    if (cbks.length > 1) return;

    redsearch.createSearch(key, {}, (err, search) => {
        if (err) console.log(err)
        for (let cll of cbks) {
            cll(search)
        }
        cbks = []
    })
}

create(key, (search) => {
    search.remove("hola")
})

create(key, (search) => {
    strs.forEach(function (str, i) { search.index(str, "hola"); });
})

create(key, (search) => {
    search
        .query('cat* mus*')
        .type('direct')
        .end(function (err, ids) {
            if (err) throw err;
            ids.forEach(function (id) {
                console.log('  - %s', id);
            });
        });
})

Install Error

When I wanted to install red with npm install reds I run into the following Error:

D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules\hiredis>node "D:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\no
gyp.js" rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn python
gyp info spawn args [ 'D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=auto',
gyp info spawn args   '-I',
gyp info spawn args   'D:\\workspace_js\\node-track-file-changes\\node_modules\\reds\\node_modules\\redis\\node_modules\\hiredis\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\933\\.node-gyp\\0.10.20\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\933\\.node-gyp\\0.10.20',
gyp info spawn args   '-Dmodule_root_dir=D:\\workspace_js\\node-track-file-changes\\node_modules\\reds\\node_modules\\redis\\node_modules\\hiredis',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'D:\\workspace_js\\node-track-file-changes\\node_modules\\reds\\node_modules\\redis\\node_modules\\hiredis\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64' ]
Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung zu ermöglichen, müssen Sie den Schalter "/m" hinzufügen.
  hiredis.c
  async.c
  net.c
  sds.c
..\..\deps\hiredis\net.c(35): fatal error C1083: Cannot open include file: 'sys/socket.h': No such file or directory [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node
_modules\hiredis\build\deps\hiredis.vcxproj]
..\..\deps\hiredis\hiredis.c(35): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node
_modules\hiredis\build\deps\hiredis.vcxproj]
..\..\deps\hiredis\async.c(35): fatal error C1083: Cannot open include file: 'strings.h': No such file or directory [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_
modules\hiredis\build\deps\hiredis.vcxproj]
d:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules\hiredis\deps\hiredis\sds.h(45): error C2054: expected '(' to follow 'inline' (..\..\deps\hiredis\sds.c) [D:\w
orkspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules\hiredis\build\deps\hiredis.vcxproj]
d:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules\hiredis\deps\hiredis\sds.h(45): error C2085: 'sdslen' : not in formal parameter list (..\..\deps\hiredis\sds.
c) [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules\hiredis\build\deps\hiredis.vcxproj]
d:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules\hiredis\deps\hiredis\sds.h(45): error C2143: syntax error : missing ';' before '{' (..\..\deps\hiredis\sds.c)
 [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules\hiredis\build\deps\hiredis.vcxproj]
d:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules\hiredis\deps\hiredis\sds.h(50): error C2054: expected '(' to follow 'inline' (..\..\deps\hiredis\sds.c) [D:\w
orkspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules\hiredis\build\deps\hiredis.vcxproj]
d:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules\hiredis\deps\hiredis\sds.h(50): error C2085: 'sdsavail' : not in formal parameter list (..\..\deps\hiredis\sd
s.c) [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules\hiredis\build\deps\hiredis.vcxproj]
d:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules\hiredis\deps\hiredis\sds.h(50): error C2143: syntax error : missing ';' before '{' (..\..\deps\hiredis\sds.c)
 [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules\hiredis\build\deps\hiredis.vcxproj]
..\..\deps\hiredis\sds.c(53): warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules\
hiredis\build\deps\hiredis.vcxproj]
..\..\deps\hiredis\sds.c(83): warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\no
de_modules\hiredis\build\deps\hiredis.vcxproj]
..\..\deps\hiredis\sds.c(104): warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules
\hiredis\build\deps\hiredis.vcxproj]
..\..\deps\hiredis\sds.c(122): warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules
\hiredis\build\deps\hiredis.vcxproj]
..\..\deps\hiredis\sds.c(123): warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules
\hiredis\build\deps\hiredis.vcxproj]
..\..\deps\hiredis\sds.c(135): warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules
\hiredis\build\deps\hiredis.vcxproj]
..\..\deps\hiredis\sds.c(136): warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules
\hiredis\build\deps\hiredis.vcxproj]
..\..\deps\hiredis\sds.c(157): warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules
\hiredis\build\deps\hiredis.vcxproj]
..\..\deps\hiredis\sds.c(158): warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules
\hiredis\build\deps\hiredis.vcxproj]
..\..\deps\hiredis\sds.c(179): warning C4013: 'va_copy' undefined; assuming extern returning int [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules\hiredis\bui
ld\deps\hiredis.vcxproj]
..\..\deps\hiredis\sds.c(214): warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules
\hiredis\build\deps\hiredis.vcxproj]
..\..\deps\hiredis\sds.c(215): warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules
\hiredis\build\deps\hiredis.vcxproj]
..\..\deps\hiredis\sds.c(225): warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules
\hiredis\build\deps\hiredis.vcxproj]
..\..\deps\hiredis\sds.c(229): warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules
\hiredis\build\deps\hiredis.vcxproj]
..\..\deps\hiredis\sds.c(237): warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules
\hiredis\build\deps\hiredis.vcxproj]
..\..\deps\hiredis\sds.c(245): warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules
\hiredis\build\deps\hiredis.vcxproj]
..\..\deps\hiredis\sds.c(246): warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules
\hiredis\build\deps\hiredis.vcxproj]
..\..\deps\hiredis\sds.c(251): warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\n
ode_modules\hiredis\build\deps\hiredis.vcxproj]
..\..\deps\hiredis\sds.c(257): warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\n
ode_modules\hiredis\build\deps\hiredis.vcxproj]
..\..\deps\hiredis\sds.c(270): warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data [D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_mo
dules\hiredis\build\deps\hiredis.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules\hiredis
gyp ERR! node -v v0.10.20
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm info [email protected] Failed to exec install script
npm info D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis\node_modules\hiredis unbuild
npm info preuninstall [email protected]
npm info uninstall [email protected]
npm info postuninstall [email protected]
npm WARN optional dep failed, continuing [email protected]
npm info build D:\workspace_js\node-track-file-changes\node_modules\reds\node_modules\redis
npm info linkStuff [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info build D:\workspace_js\node-track-file-changes\node_modules\reds
npm info linkStuff [email protected]
npm info install [email protected]
npm info postinstall [email protected]
[email protected] node_modules\reds
├── [email protected] ([email protected], [email protected], [email protected])
└── [email protected]
npm info ok

System: Windows7 (64 Bit)
Node: v0.10.20

Edited: Ah ok its the hiredis modul that makes problem.

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.