[MarkLogic Dev General] Stemming/diacritics

2014-12-15 Thread ville
Hi we're trying to build a search that would find all words müller, muller and mueller using any of the three words. We've got müller and muller working as expected, but can't get mueller to play nice. (Or other umlauts flattened with ae, ue oe etc.) What would be the easiest way to achieve

Re: [MarkLogic Dev General] Stemming/diacritics

2014-12-15 Thread Mary Holstege
On Mon, 15 Dec 2014 02:31:51 -0800, vi...@tilaton.fi vi...@tilaton.fi wrote: Hi we're trying to build a search that would find all words müller, muller and mueller using any of the three words. We've got müller and muller working as expected, but can't get mueller to play nice. (Or

[MarkLogic Dev General] Problem Importing MarkLogic modules from the REST API

2014-12-15 Thread Fabian Jaramillo
Hello, I’m trying to use the module JSON (http://marklogic.com/xdmp/json http://marklogic.com/xdmp/json) from one Extension REST API and I get an error XDMP-MODNOTFOUND, but if I use the admin user to deploy everything works, somebody knows what is the permission that I have to add to my

Re: [MarkLogic Dev General] Problem Importing MarkLogic modules from the REST API

2014-12-15 Thread David Lee
Could you show us the snippet of your extension module, particularly how you import the JSON library ? Also what version of ML are you running. The default search path for modules will differ depending on your application but I don't know how using a different user for deployment would affect

Re: [MarkLogic Dev General] Problem Importing MarkLogic modules from the REST API

2014-12-15 Thread Fabian Jaramillo
Hello David, Thanks for answer so quickly, sur, look at this is my extension: xquery version 1.0-ml; module namespace security = http://marklogic.com/rest-api/resource/security;; import module namespace res = http://www.product.com/libs/response; at /app/libraries/response.xqy; import

[MarkLogic Dev General] MarkLogic use case

2014-12-15 Thread Maisnam Ns
Hi, I have to insert data that comes in various formats xml, csv ,json , bib,images and pdf. For whatever I know , I can use xml as it is and create range index on elements . But can someone help me whether pdf , json and bib can have range indexes. I am of the view that these formats need to be

[MarkLogic Dev General] Apply query boosting based on attribute value

2014-12-15 Thread Blessing N
Hi, I have a scenario where the query boosting has to be applied based on an attribute value in the record. Consider the following records record words wordpsychology/word wordHealth/word wordScience/word /words boostedwords boostedword isBoosted=falseScience/boostedword /boostedwords /record

Re: [MarkLogic Dev General] MarkLogic use case

2014-12-15 Thread Michael Blakeley
Range indexes require XML. Take a look at https://docs.marklogic.com/guide/cpf/default for PDF. You'll have some work to do selecting the right content to feed into your range index. JSON should be easy too, because it has an XML representation. For csv and the others you are basically on

Re: [MarkLogic Dev General] MarkLogic use case

2014-12-15 Thread Dave Cassel
First, JSON. In MarkLogic 7, documents are one of XML, text, or binary. If you insert and retrieve documents through the REST API, they will be quietly converted to XML and you can build range indexes on those converted documents. Users of the API will just see them as JSON documents. In

Re: [MarkLogic Dev General] MarkLogic use case

2014-12-15 Thread Rob Szkutak
Something else to keep in your mind as you're bringing in data is whether or not you want to perform any content enrichment or transformation on the data. If you do, you'll want to look into using CPF (which supports various input formats including PDF) or writing your own xQuery to handle the

[MarkLogic Dev General] ways to execute xQuery against MarkLogic

2014-12-15 Thread Alexei Betin
Hello, I've been experimenting with xQuery syntax using MarkLogic Query console and I've been quite happy with the results so far, but now I'd like to make sure I understand all the options for using xQuery against MarkLogic in an client application: From documentation, one sure way to

Re: [MarkLogic Dev General] ways to execute xQuery against MarkLogic

2014-12-15 Thread Danny Sokolsky
Hi Alexei, The most common way to evaluate xquery modules is to create an HTTP App Server, put the code as xqy files under the app server root, and then hit the URL with a browser or with a tool like curl. For example, suppose you have an HTTP App Server you have set up with a root of

Re: [MarkLogic Dev General] ways to execute xQuery against

2014-12-15 Thread Alexei Betin
Thanks, Danny Yes, this is pretty much what I am after, except is there also a way to pass parameters to my query? E.g., if I did curl http://localhost:9876/hello.xqy?param1=value1param2=value2 Could I access the values of param's in my xQuery code? Thanks, Alexei Betin -Original

Re: [MarkLogic Dev General] ways to execute xQuery against

2014-12-15 Thread David Lee
Yes, http://docs.marklogic.com/xdmp:get-request-field This and the related functions that start with xdmp:get-request-xxx allow access to prety much everything from the request. Note that the term field is used - this is the combination of query params AND form fields (if it was a POST). You

Re: [MarkLogic Dev General] ways to execute xQuery against

2014-12-15 Thread Michael Blakeley
Yes, using https://docs.marklogic.com/xdmp:get-request-field -- Mike On 15 Dec 2014, at 18:28 , Alexei Betin abe...@elevate.com wrote: Thanks, Danny Yes, this is pretty much what I am after, except is there also a way to pass parameters to my query? E.g., if I did curl

Re: [MarkLogic Dev General] ways to execute xQuery against

2014-12-15 Thread Rob Szkutak
Hi Alexei, Yes, you can do this. Here's the code to add to your xQuery for those particular parameters: let $param1 := xdmp:get-request-field(param1, default value) let $param2 := xdmp:get-request-field(param2, default value) Some full examples and more information can be found here:

Re: [MarkLogic Dev General] ways to execute xQuery against

2014-12-15 Thread Rob Szkutak
Hi again, I forgot to mention: You may also want to look at our guide to extending the REST API which describes a formal way to handle various HTTP methods (GET, PUT, POST, etc.) upon the same REST endpoint: https://docs.marklogic.com/guide/rest-dev/extensions Best, Rob -Original