Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Cakefile
README.md
package.json
search.coffee
search.js

README.md

npm install complex-search

Use this for complex, keyword-based search with the following operators:

|&()

("or", "and", and parens, "and" is the default)

Do not use it if you have high data volumes or so. Reason following below:

API:

var Search = require('complex-search')
var search = new Search("xml&(sax|parser)", function(results) {
    console.log(results.join(", "))
})
search.keywords.forEach(function(keyword) {
    callSomeAPIOrWhatever(keyword, function(keywordData) {
        // keywordData is an array of strings, e.g. ["mycoolparser", "parser2", "parser3"]
        search.provideKeywordData(keyword, keywordData)
    })
})

As you can see, you need all results for each keyword. No problem if everything is on disk and you don't need this very often, but hell, don't think about it if you want to recreate Google or so.

Something went wrong with that request. Please try again.