marklogic/slush-marklogic-node — pull request #49 by joemfb (2014-10-29 04:41:22+00:00)
Title: refactored sample.search to use ml-search-ng

https://github.com/joemfb/ml-search-ng is new project encapsulating the MLSearchContext and several search-UI directives (facets, results, metrics, input, etc.). It depends on https://github.com/joemfb/ml-common-ng, which includes MLRest, and a new MLQueryBuilder (API based on https://github.com/marklogic/node-client-api/blob/master/lib/query-builder.js).

This pull request integrates these projects. Specifically, I:

- rewrote search ctrl and template
- replaced search form in index.html with ml-remote-input directive
- removed facets and results directives (superseded by ml-search-ng directives)
- removed sample.common/MLRest (superseded by ml.common/MLRest)
- renamed MLQueryBuilder -> MLSampleQueryBuilder (avoid name collision with ml.common/MLQueryBuilder)
- removed dependency on mlFacets (unused, obsolete)

Since MLSearchContext (via the search controller) is modifying URL parameters, it can't be always active like it is now. So I rewrote the mlUser directive to not depend on a parent scope, and refactored the UserService to supports this.

These changes introduce a dependency on lodash.