Code Monkey home page Code Monkey logo

slush-marklogic-node's People

Contributors

audarth avatar daveegrant avatar divino avatar dmcassel avatar grtjn avatar hunterwilliams avatar janmichaelyu avatar jenbreese avatar joemfb avatar maeisabelle avatar mariannemyers avatar patrickmcelwee avatar paxtonhare avatar popzip avatar ryanjdew 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

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

slush-marklogic-node's Issues

Move JSON samples to sample-data

The data/ folder is the default for deploying content with Roxy. It would be convenient if the JSON sample documents would be placed in a different folder, for instance sample-data/, since they are loaded with MLCP, and not with Roxy.

Replace detail.xslt with client-side rendering

detail.xslt is used to provide rendering of XML, but that causes part of rendering to take place outside of the usual views and templates. It also requires client-side compilation (compile directive) to make angular instructions work inside it.

Instead, rendering should take place on client-side only, and server-side should only indent, transform to json and/or highlight..

Issue with proxying data to ML

The current server.js implementation is using a bodyParser:

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({
  extended: true
}));

These lines seem to interfere with POST/PUT of JSON and binary to MarkLogic. Passing through JSON has a weird effect that MarkLogic keeps reading request body until it hits the length limit. Binary doesn't come through either.

I had to disable above lines, or revert to the 'request' library, which allows direct piping of request and response. Unfortunately, both solutions cause deprecation warnings to be shown, and the latter looks like it is a bit slower, but that is bit difficult to prove..

Edit and delete options for slush-marklogic

Great new framework for creating apps in place of app builder.

Is it possible to add the the default configuration the ability edit and delete documents?

Would greatly help in creating sample applications.

Create new release

Various important issues have been fixed, but not yet released. Time for a new release.

For those who cannot wait:

sudo npm install -g git://github.com/marklogic/slush-marklogic-node.git

Importing the testdata gives warnings and import fails

When I tried importing the testdata. I got an invalid argument warning and the files are not imported into the database:
Warning is:
14/08/18 11:47:59 WARN mapreduce.ContentWriter: Invalid argument (json:INVALIDARG):

Improve mlrest to read search options from server

Search options from server can be leveraged to improve building structured query, and prevent the need to add app-specific details to properly build queries for facets, geo-bounds, etc.

Search options can also be used amongst others to read sort options, snippet options, discover presence of geospatial facets, discover presence of values and tuples endpoints..

Add ESRI Map Display in Detail View

Begin adding geospatial view of data using ESRI Maps JS API. This ticket is to add a map display showing the location of a document that contains geospatial data.

Unnecessary redirects in server.js

Server.js contains lines like:

  app.use('/profile', express.static(__dirname + '/ui/app'));

But it suffices to have a general one:

  app.use('/*', express.static(__dirname + '/ui/app'));

Add default rest-transform for 'filtering' binary docs at upload

You sometimes like to upload binaries, and do processing on them. Activating CPF, and/or triggers for that can be an option, but that can sometimes be a bit heavy for occasional upload of binaries. You can however also do manipulation/enrichment at PUT using a REST-api transformation.

Applying xdmp:document-filter on binaries, and storing results in properties can be a useful REST transform, should be included to the sample app by default.

Add default rest-transform for downloading data

The current documents endpoint doesn't return an accurate mime-type, causing some browsers to show binaries in a wrong way in the browser. This can be fixed with a rest-transform that provides a more accurate mime-type (based on MarkLogic mime-type settings for extensions).

Missing src/transform/to-json.xqy

In README.mdown it says

The to-json.xqy module is provided in the sample application under the src/transform directory.

For me, /src in my project root is an empty directory so I'm not seeing a /src/transform directory at all and searching the project for a to-json.xqy file is not yielding anything.

Is it possible that I'm having this issue because I installed via NPM and the NPM module is out of sync with this github repo? The NPM page for the module says last updated 3 months ago, whereas this repo was updated less than a day ago, also the README is very different between the NPM module page and github repo. I generated the slush scaffold via npm install -g slush / npm install -g slush-marklogic-node / slush marklogic-node <app-name>

I had also read some details about the latest mlcp over here but this is for other sources, whereas I'd love to just have a look at the sample data source that is meant to be included with the slush scaffold project.

Would be great to know where to get that so that I can bootstrap some data, apologies if I'm missing something obvious!

The sample app should not trigger a search at init

Login has not happened yet at init of search ctrl, so unnecessary to try to search. Doing so at successful login is sufficient. You can also save a round-trip to server if authenticated is false, and flush potentially existing search results immediately.

server.js should honor Content-Disposition and pass-through header

When using rest extensions, the server.js should honor a request with Content-Disposition and forward it as a header back to application

To resolve issue

      //If the file is a download then set the header to passthrough
      if(response.headers["content-disposition"]) {
          res.header("Content-Disposition",response.headers["content-disposition"]);
      }  

Add default rest-extension for analyzing data

Analyzing data is a very common task. A rest-extension that helps to analyze-data in the initial phase, and helps come up with a set of initial indexes, can give a large jump-start. Such a rest-extension is available, and could be included by default in the sample app.

Details of sample data not showing

Detail view only shows { }. It is because document is retrieved as is, but is currently saved as XML-JSON. It requires adding transform: 'to-json' to the /v1/documents call in detail-ctrl.js..

Use ml. prefix for independent modules

Modules that are fully generic, like sample.common (which includes mlrest service) should not use sample. prefix, but rather use a prefix like ml. or alike.

Might be worth considering making those bower components as well. That would enable explicitly leveraging versioning in dependency management..

Use absolute paths in index.html

Some references to css and js in bower_components and such don't start with /. This will cause the browser to load new copies of such files for each main uri path. E.g. once for /, once for /profile, once for /whatever. Adding / in front of those prevents unnecessary loading resources multiple times.

Write a getting started

Write a more general description how to use it, what tools/features it includes, what those are meant for, etc.

Eliminate common/

Common module and the remaining mlquery.js have been replaced with ml-common-ng. They can be removed from this template.

Add default rest-extension for similar queries

The built-in search endpoint provides support for similar queries, but that can be a little impractical, and it simply refuses if there is a binary result among your search results.

A separate rest-extension for similar queries can be useful. It could be included by default in the sample app.

Highlighting not rendered properly

Search results containing the searched text term are rendered like:

{"highlight":"Auftrag"}
Nr. 0830009072/70
{"highlight":"Auftrag"}
Nr. 0830009072/75

Should not show JSON structure, and apply some kind of visual highlighting.

Deprecation warning at running gulp server

Running gulp server shows warnings:

templates gjosten$ gulp server
[gulp] Using gulpfile ~/Projects/slush-marklogic-node/app/templates/gulpfile.js
[gulp] Starting 'server'...
express-session deprecated undefined resave option; provide resave option server.js:34:11
express-session deprecated undefined saveUninitialized option; provide saveUninitialized option server.js:34:11
[gulp] Finished 'server' after 170 ms

Switch to ui-router

Switch from angular-router to ui-router for a more advanced, and popular solution, preferably without adding complexity..

mlMapsProvider api changed..

mlMapsProvider.version call in app.js no longer works. It should be .useVersion now. Matt reports all three lines could be commented, since ml-map is not being used (yet)..

Improve mlrest to add more search functionality

Current mlrest service doesn't cover the entire REST-api yet. The api includes very useful endpoints like content-based search suggestions, sparql-endpoint, getting values, and tuples, etc. Existing functions could also support more (optional) parameters to increase flexibility, and for instance call search endpoint to pull facets and results separately.

Add default favicon

A default favicon is missing, and the remark to put a favicon.ico in the root is no longer the recommended method. Add explicit links in index.html, and add a ML favicon as default. Makes it easier to find the appropriate place to put a favicon as well.

Additional Dependency

Based on experience with an initial install, it looks like bower is also a dependency, and the README doc should be updated.

Add geospatial component

To make it easy to set up geospatial search, include components in the generator for doing so.

extsuggest still necessary?

As of MarkLogic 7 the REST-api provides a suggest endpoint (/v1/suggest) out of the box, that is pretty much a drop-in replacement for extsuggest. Do we want to preserve extsuggest in favor of MarkLogic 6?

Duplicate facet selections in search model and search context

Search model and search context are both keeping track of selected facets. Search context should be sufficient. Requires extending mlrest/searchcontext functionality regarding facetSelections a bit.

After that, just needs exposing facetSelections of searchContext to facets directive directly. Could be done by adding searchContext to $scope, and then pointing facets dir to searchContext.facetSelections instead of to model.selected..

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.