Re: [MarkLogic Dev General] Extracting ML Documents to a zip file using Java Client Api ?

2018-02-07 Thread Sam Mefford
after dmm.stopJob(batcher);: out.close(); Also, surround your listener code in a synchronized(out) {...} block so the threads won't overwrite each other as they write to the stream. Remember, your listener code is going to run in 10 threads in parallel, so your code in the listener needs to be thread-

Re: [MarkLogic Dev General] Is there compress option for exportListener in Marklogic Java Client API?

2018-02-06 Thread Sam Mefford
hat you need? If not, could you help describe your requirements in more detail? Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklogic.com Cell: +1 801 706 9731 www.marklogic.com<http://www.marklogic.com> This e-mail and any accompanying attachments are confidential. The information

Re: [MarkLogic Dev General] mlcp for multiple host

2018-01-31 Thread Sam Mefford
Vikas, I'm sorry I can't answer on MLCPBean. But I think the more supported way to do this is using the Data Movement SDK<https://developer.marklogic.com/learn/data-movement-sdk>. Have you looked at that? Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklogic.com Ce

Re: [MarkLogic Dev General] Regarding DMSDK

2018-01-30 Thread Sam Mefford
com/guide/java/data-movement#id_26583> docs.marklogic.com MarkLogic is the only Enterprise NoSQL Database Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklogic.com Cell: +1 801 706 9731 www.marklogic.com<http://www.marklogic.com> This e-mail and any accompanying

Re: [MarkLogic Dev General] Regarding DMSDK

2018-01-29 Thread Sam Mefford
? Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklogic.com Cell: +1 801 706 9731 www.marklogic.com<http://www.marklogic.com> This e-mail and any accompanying attachments are confidential. The information is intended solely for the use of the individual to whom it is add

Re: [MarkLogic Dev General] Noob query question..

2017-08-24 Thread Sam Mefford
I should point out that this is not the fastest way to do it. A faster way would be to index "date-taken" as a dateTime element range index and use cts:search with cts:element-range-query. Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklogic.com Cell: +1 80

Re: [MarkLogic Dev General] Noob query question..

2017-08-24 Thread Sam Mefford
te[fn:days-from-duration(fn:current-date() - date-taken) > (365 * 2)]) Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklogic.com Cell: +1 801 706 9731 www.marklogic.com<http://www.marklogic.com> This e-mail and any accompanying attachments are confidential. The infor

Re: [MarkLogic Dev General] Large job processing question.

2017-08-22 Thread Sam Mefford
3 The source documents can be read from a staging area containing at least the uri and the up-to-date hashcode for each document. This will reduce the read load on the source system to only documents found to be missing from MarkLogic or updated from what is in MarkLogic. Sam Mefford Senior

Re: [MarkLogic Dev General] Logging Java Api

2017-05-19 Thread Sam Mefford
d take no more than 15 minutes. Once your logging framework is configured with slf4j, you should be able to see and manage logging from the Java-client API. This is especially important for long-running QueryBatcher and WriteBatcher jobs. Sam Mefford Senior Engineer MarkLogic Corporation sam

Re: [MarkLogic Dev General] MarkLogic unexpected REST authentication (digest)

2017-04-12 Thread Sam Mefford
Consider sending the curl output with -v Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklogic.com<mailto:sam.meff...@marklogic.com> Cell: +1 801 706 9731 www.marklogic.com<http://www.marklogic.com> This e-mail and any accompanying attachments are confidential. The

Re: [MarkLogic Dev General] Trying to find equivalent to MongoDB aggregate( match -> project[include] -> project[exclude] -> unwind )

2017-04-12 Thread Sam Mefford
Can you give some context as to what "a better way" should do better than your solution? Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklogic.com Cell: +1 801 706 9731 www.marklogic.com<http://www.marklogic.com> This e-mail and any accompanying attachments

Re: [MarkLogic Dev General] How to pass parameters between JavaScript functions?

2017-02-08 Thread Sam Mefford
I think you need to add "return" before parseFlights(resp); in the getFlightsInAir function. Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklogic.com<mailto:sam.meff...@marklogic.com> Cell: +1 801 706 9731 www.marklogic.com<http://www.marklogic.com>

Re: [MarkLogic Dev General] XML to JSON using MLCP

2017-02-07 Thread Sam Mefford
Have you looked at using a transform? Here's an example from the docs<https://docs.marklogic.com/guide/mlcp/import#id_17589> that converts from binary to XML, so I'm guessing you can convert from XML to JSON. Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklog

Re: [MarkLogic Dev General] How to get the number of records ingested by a MLCP hit

2017-01-12 Thread Sam Mefford
the Data Movement SDK is also available via the Early Access program or via github: https://github.com/marklogic/java-client-api/tree/4.0.0-EA4 Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklogic.com Cell: +1 801 706 9731 www.marklogic.com<http://www.marklogic.com>

Re: [MarkLogic Dev General] How to get the number of records ingested by a MLCP hit

2017-01-11 Thread Sam Mefford
I'm sure you could find a way. But using mlcp in a Java application is not a supported usage. mlcp is designed to run at the command-line. Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklogic.com Cell: +1 801 706 9731 www.marklogic.com<http://www.marklogic.com> This

Re: [MarkLogic Dev General] Execute Xquery code using REST API

2017-01-11 Thread Sam Mefford
Can you share more details about what you've tried and how you've verified that it's not working? Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklogic.com Cell: +1 801 706 9731 www.marklogic.com<http://www.marklogic.com> This e-mail and any accompanying attac

Re: [MarkLogic Dev General] How to pull data out of marklogic quickly?

2016-10-11 Thread Sam Mefford
of the fastest options for you since the answers come directly out of the in-memory range indexes. Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklogic.com<mailto:sam.meff...@marklogic.com> Cell: +1 801 706 9731 www.marklogic.com<http://www.marklogic.com> This e-mai

Re: [MarkLogic Dev General] mlcp and loading multiple files

2016-07-08 Thread Sam Mefford
et first. I have written more advanced transforms in the past that can merge all dependencies whenever the last one arrives, but that's only necessary when you can't find a way to just load the first set first. Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklogic.com<

Re: [MarkLogic Dev General] Avoiding Facets in search:snippet highlight

2016-06-14 Thread Sam Mefford
To do this I think you'll need a custom snippeting function<https://docs.marklogic.com/guide/search-dev/query-options#id_61707> with custom highlighting<https://docs.marklogic.com/guide/search-dev/highlight#id_79734>. Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@m

Re: [MarkLogic Dev General] Banking - ml vs ms sql (or oracle) | performance story

2016-05-18 Thread Sam Mefford
model and application data model? * does the trade-store require any advanced server-side rules at index time / query time? * if so, are there features that will help implement those rules * etc., etc. Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklog

Re: [MarkLogic Dev General] Exporting Xquery files using MLCP

2016-03-31 Thread Sam Mefford
ontentAs(String.class); System.out.println("docContents=[" + docContents + "]"); } Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklogic.com<mailto:sam.meff...@marklogic.com> Cell: +1 801 706 9731 www.marklogic.com<http://www.marklogic.com>

Re: [MarkLogic Dev General] New to Marklogic, Java REST API client

2016-02-22 Thread Sam Mefford
ent("value"); w.writeAttribute("type", "string"); w.writeStartElement("json-property"); w.writeCharacters("affiliation"); w.writeEndElement(); w.writeEndElement(); w.writeEndElemen

Re: [MarkLogic Dev General] MarkLogic highlights wrong content when searched

2015-12-10 Thread Sam Mefford
I answered this question on Stack Overflow: http://stackoverflow.com/a/34206432/3582140http://stackoverflow.com/a/34206432/3582140 Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklogic.com Cell: +1 801 706 9731 www.marklogic.com<http://www.marklogic.com> This e-mail a

Re: [MarkLogic Dev General] search MarkLogic Database using Regular Expressions

2015-07-16 Thread Sam Mefford
. In my experience, don't use an NLP tool if you can solve the problem with a simple regex. Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklogic.commailto:sam.meff...@marklogic.com Cell: +1 801 706 9731 www.marklogic.comhttp://www.marklogic.com This e-mail and any accompanying

Re: [MarkLogic Dev General] Rest API extract-document-data

2015-04-17 Thread Sam Mefford
immediately: Document results = queryMgr.search(query, new DOMHandle()).get(); NodeList extracts = results.getElementsByTagNameNS(*, extracted); for (int i=0; i extracts.getLength(); i++ ) { Node extract = extracts.item(i); } Sam Mefford Senior Engineer

Re: [MarkLogic Dev General] search:search constraint for document URI

2015-04-01 Thread Sam Mefford
This use case looks perfect for what Erik is describing, using search:document-query. Your application can add that directly as part of the structured query so there's no need for a constraint. Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklogic.com Cell: +1 801 706 9731

Re: [MarkLogic Dev General] Getting null directory using JAVA API

2015-02-24 Thread Sam Mefford
book. Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklogic.commailto:sam.meff...@marklogic.com Cell: +1 801 706 9731 www.marklogic.comhttp://www.marklogic.com This e-mail and any accompanying attachments are confidential. The information is intended solely for the use

Re: [MarkLogic Dev General] Converting Marklogic Java options to xml options

2015-02-23 Thread Sam Mefford
-optiondescending/facet-option /range /constraint ... /options Sam Mefford Senior Engineer MarkLogic Corporation sam.meff...@marklogic.commailto:sam.meff...@marklogic.com Cell: +1 801 706 9731 www.marklogic.comhttp://www.marklogic.com This e-mail and any accompanying attachments are confidential

Re: [MarkLogic Dev General] Error trying to create query options in xml

2015-02-23 Thread Sam Mefford
ValuesHandle()); for (CountedDistinctValue value : values.getValues() ) { String textValue = value.get(xs:string, String.class); System.out.println(textValue + + value.getCount()); } } } Sam Mefford Senior Engineer MarkLogic Corporation sam.meff

Re: [MarkLogic Dev General] Problem designing DB Architecure for MarkLogic

2015-02-13 Thread Sam Mefford
Group_idGroup1/Group_id NameMark/Name Project NameProject1/Name /Project /User User Id2/Id Group_idGroup2/Group_id NameLisa/Name Gallery album_Id1/album_Id Album_NameMyalbum1/Album_Name /Gallery /User Sam Mefford Senior Engineer MarkLogic Corporation sam.meff

[MarkLogic Dev General] How to track collection last modified?

2012-01-26 Thread Sam Mefford
? -- Sam Mefford Avalon Consulting, LLC (801) 706-9731 ___ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general

[MarkLogic Dev General] Support for direct-child queries?

2010-09-17 Thread Sam Mefford
, but I see no way to limit the matching only to direct children. Thus I'm matching TITLE tags that are children of descendant TABLE tags, rather than only match the direct-child INFO-OBJ/TITLE tags I want. Any ideas? Sam Mefford sam.meff...@marklogic.com 801-706-9731

[MarkLogic Dev General] general@developer.marklogic.com

2010-09-17 Thread Sam Mefford
: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Sam Mefford Sent: Friday, September 17, 2010 10:21 AM To: General Mark Logic Developer Discussion Subject: [MarkLogic Dev General] Support for direct-child queries? I have a need to retrieve relevance