Skip to content

ActiveDocument is an open source Ruby connector for MarkLogic server, although at a later date it could potentially expanded to work with other XML databases. The goal of ActiveDocument is to make it as easy for developers to work with MarkLogic as ActiveRecord makes it for them to work with an RDBMS. The intent is to make them write as little X…

Notifications You must be signed in to change notification settings

tomhat/ActiveDocument

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to ActiveDocument!

***************
* Usage Notes *
***************
install:
Requires the nokogiri gem.
ML: Place the dynamic_dispatch.xqy XQuery file somewhere in ML accessible via your http server


Developers should extend ActiveDocument::Base to create their own domain specific classes.
eg. class Person < ActiveDocument::Base

Search methods called on a class derived from ActiveDocument::Base will return a SearchResults object and are guaranteed to be of the
same domain type (as determined by the element type of the root document node). SearchResults are Enumerable and contain information about
search metrics as well as n number of SearchResult objects. The SearchResult objects contain information about what documents
matched the search and why as well as a method for loading the document into a domain class.

Search methods called on the Finder class will return a SearchResults object and are NOT guaranteed to be of any particular
type (as determined by the element type of the root document node) and in many cases will be of varied type. Developers should
leverage the root_type() method of the SearchResult object for determining what type of domain class to use to
instantiate the document represented by the SearchResult.

Configuration:
Configuration is handled by calling the config() method on either the Finder class or the ActiveDocument::Base class and
passing in the path to the YAML configuration file. See the unit tests for a sample yaml configuration file.

For more information contact [email protected]

About

ActiveDocument is an open source Ruby connector for MarkLogic server, although at a later date it could potentially expanded to work with other XML databases. The goal of ActiveDocument is to make it as easy for developers to work with MarkLogic as ActiveRecord makes it for them to work with an RDBMS. The intent is to make them write as little X…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published