Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

ML7: Ability to deploy Search API response transform #107

Closed
peterskim12 opened this issue Jun 5, 2013 · 3 comments
Closed

ML7: Ability to deploy Search API response transform #107

peterskim12 opened this issue Jun 5, 2013 · 3 comments
Assignees

Comments

@peterskim12
Copy link
Contributor

The Java and REST API in MarkLogic 7 will be updated to support specifying an XSLT or XQuery module to apply to the search results response as a transform.

It's not clear exactly how these are persisted in the database but it may be a useful feature for Roxy to be able to deploy these as a part of the 'deploy modules' process.

The Roxy project will need to have some directory where the user can put their search transforms, similar to how the rest-ext directory exists for the REST API extensions.

@dmcassel
Copy link
Collaborator

dmcassel commented Jun 6, 2013

Transforms are used in the document endpoints now. I haven't used them enough to think about good ways to deploy, but yes, I agree this should get done.

@peterskim12
Copy link
Contributor Author

Cool, I didn't realize that this already existed for document endpoints.
Looks like we just need to make a PUT request:

PUT /v1/config/transforms/{name}

We could have a directory called 'transforms' and the filename (without file extension) would be the name of the transform.

e.g. the transform at <roxy_dir>/transforms/my-search-result-transform.xqy
would be PUT to:
/v1/config/transforms/my-search-result-transform

@dmcassel
Copy link
Collaborator

dmcassel commented Jun 6, 2013

Simple enough.

At the same time, I'm thinking of changing the default directories for rest-related stuff. Currently, there's rest-api/ for options and properties and rest-ext for extensions. I'm thinking this would be better:

rest-api/config
rest-api/ext
rest-api/transforms

The deployer keys off the locations in properties files, so the deploy process wouldn't change, just the initialization.

@ghost ghost assigned peterskim12 Jun 6, 2013
peterskim12 pushed a commit that referenced this issue Jun 7, 2013
…dified dir structure for rest-api config and extensions
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants