Giter Site home page Giter Site logo

couchdb-lucene-rake's Introduction

Couchdb-lucene-rake

A task to push couchdb-lucene indexes via rake.

This tool has the goal of keeping couchdb-lucene scripts easily maintainable by using a directory layout convention and javascript with .js extension to make it suitable to edit inside your favorite text editor or IDE.

Those take could be easily written using the CouchRest RESTful client for CouchDB and were inspired by the CouchRestRails plugin

The tasks are:

  • push - push the indexes views from your file system to couchdb.
  • pull - pull the indexes view from couchdb to your file system

Dependencies

Usage

rake -f tasks/couchdb_lucene_rake.rake couchdb:lucene:push[<database-url>,<design-document>]

Will push the lucene views from disk to the database-url on the design-document.

rake -f tasks/couchdb_lucene_rake.rake couchdb:lucene:pull[<database-url>,<design-document>]

Will pull the lucene views from the database-url on the design-document and save them on disk.

Example

A directory layout like this:

<root>  
    |-- fulltext  
              |-- all.js  

Note that the "fulltext" name is mandatory for the directory under .

where all.js contains:

function(doc) {
	var ret = new Document();
	ret.add(doc.subject);
	return ret;
}

will produce a design document like:

{

   "_id": "_design/bag",
   "fulltext": {
       "all": {
         "index": "function(doc) {\n    var ret = new Document();\n    ret.add(doc.subject); \n return ret;\n}\n"
       }
   }
}

TODO

  • Create .couchdb-lucene-rake with database and design-documents configuration.
  • Write tests

couchdb-lucene-rake's People

Contributors

marcosvm avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.