Re: [MarkLogic Dev General] Search results are same w/ or w/o punctuation with unfiltered search option

2017-07-31 Thread Indrajeet Verma
Thank You!

On Tue, Aug 1, 2017 at 12:07 AM, Erik Hennum 
wrote:

> Hi, Indrajeet:
>
> Mary Holstege provides a concise and authoritative explanation here:
>
> http://markmail.org/message/r2sdkmjzrawdjpjn
>
> In essence, enable the fast-diacritic-sensitive-searches index (either
> for the entire database or a field on the element or property) and
> pass the punctuation sensitive (or exact) option on a value query.
>
>
> Hoping that helps,
>
>
> Erik Hennum
>
>
> --
> *From:* general-boun...@developer.marklogic.com [
> general-boun...@developer.marklogic.com] on behalf of Indrajeet Verma [
> indrajeet.ve...@gmail.com]
> *Sent:* Monday, July 31, 2017 4:38 AM
> *To:* MarkLogic Developer Discussion
> *Subject:* [MarkLogic Dev General] Search results are same w/ or w/o
> punctuation with unfiltered search option
>
> Hi - The search:search() is giving same results for keyword 10, 10%, 10#%@
> and $10 when I use "unfiltered" search option. Though when I use "filtered"
> search-option, the results are accurate and punctuation is considered in
> the query text.
>
> Is there any way if I can get correct results using "unfiltered" option
> for the query text with punctuation as if I use filtered option the
> response time drastically increases.
>
> Thank You!
>
> Regards,
> Indrajeet
>
> ___
> General mailing list
> General@developer.marklogic.com
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] MarkLogic Data Hub Tutorial problems

2017-07-31 Thread Geoffrey Skellams
Hi Chris,

We’re running MarkLogic v9.

There appears to be have been a change in the tutorial webpages overnight, 
because it’s now suggesting we use a v2 data hub quickstart for MarkLogic 9, 
rather than the v1.1.x versions that we were using yesterday. I’m trying to 
uninstall the old data hub now (and getting lots of Java exceptions on my 
console window), so that I can run up the v2 data hub instead.

Cheers
Geoff

From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Chris Day
Sent: Tuesday, 1 August 2017 10:14 AM
To: MarkLogic Developer Discussion 
Subject: Re: [MarkLogic Dev General] MarkLogic Data Hub Tutorial problems

HI Geoff,

Great that you are getting across the MarkLogic Data Hub.

Which version of MarkLogic have you got installed to run the Data Hub framework 
against?

Regards,
Chris Day

Chris Day - Sales Engineer
chris@marklogic.com
 

Mobile:  +61 433 370 083

Phone:  +61 2 8315 1556

Skype:  chrisday-aus
Twitter:  @ML_ChrisDay

MarkLogic Pty Ltd
www.marklogic.com

What’s new in MarkLogic 9? MLU self-paced course -  
https://goo.gl/tMWkoq

[cid:image001.jpg@01D30AB0.F5D90A00]
This e-mail and any accompanying attachments are confidential. The information 
is intended solely for the use of the individual to whom it is addressed. Any 
review, disclosure, copying, distribution, or use of this e-mail communication 
by others is strictly prohibited. If you are not the intended recipient, please 
notify us immediately by returning this message to the sender and delete all 
copies. Thank you for your cooperation.


From: 
>
 on behalf of Geoffrey Skellams 
>
Reply-To: MarkLogic Developer Discussion 
>
Date: Monday, 31 July 2017 at 3:59 pm
To: "general@developer.marklogic.com" 
>
Subject: [MarkLogic Dev General] MarkLogic Data Hub Tutorial problems

Afternoon all,

I’m brand new to using MarkLogic, and I’m trying to work my way through the 
MarkLogic Data Hub tutorial on GitHub 
(https://marklogic-community.github.io/marklogic-data-hub/).
 At this point, I am simply just following the instructions as written to get a 
feel for what the process is and make sure that we can get some data into a 
database correctly.

I’m running MarkLogic on a Windows Server 2016 VM in the Microsoft Azure cloud, 
using the current version of Java 8. Last week I tried using the DataHub 
v.1.1.4 .war file, but ran into errors with it, and thought I had done 
something wrong, so we destroyed the virtual machine, created a brand new one, 
installed the software, but used the v.1.1.3 .war file on advice from 
colleagues who had some success with it last week (but are unable to do so 
again today).

Everything seems to go well, until I get to step 8, ingesting the Acme Tech 
data. The DataHub’s log shows the import as failing, and I’ve included the log 
file below. If I try to ingest the GlobalTech records, I get similar problems 
(although a lot more of them, considering the larger data file size).

It turns out that the error messages from the v1.1.4 hub were the same as the 
ones below.

I’ve tried googling the problem, but can’t seem to find anything that resembles 
this issue.

Can anyone suggest a reason why this is occurring and what we can do to fix it? 
Is it simply a PEBKAC issue (i.e: both myself and my colleague have somehow 
missed important steps), or does the tutorial documentation not match up with 
the latest versions of the hub?


- BEGIN LOG FILE CONTENTS -
8:22.876 [main] INFO  c.m.contentpump.LocalJobRunner - Content type: JSON
03:48:24.043 [main] INFO  c.marklogic.contentpump.ContentPump - Job name: 
local_702976126_1
03:48:24.076 [main] INFO  c.m.c.FileAndDirectoryInputFormat - Total input paths 
to process : 2
03:48:25.552 [pool-1-thread-2] ERROR c.m.contentpump.TransformWriter - 
QueryException:XDMP-AS: (err:XPTY0004) $transform-option as map:map? -- Invalid 
coercion: "/34324.json" as map:map
03:48:25.552 [pool-1-thread-2] WARN  c.m.contentpump.TransformWriter - Failed 
document /34324.json in file:/C:/data-hub/input/AcmeTech/34324.json
03:48:25.555 [pool-1-thread-1] ERROR c.m.contentpump.TransformWriter - 
QueryException:XDMP-AS: (err:XPTY0004) $transform-option as map:map? -- Invalid 
coercion: "/32920.json" as map:map
03:48:25.555 [pool-1-thread-1] WARN  c.m.contentpump.TransformWriter - Failed 
document /32920.json in file:/C:/data-hub/input/AcmeTech/32920.json
03:48:25.564 [Thread-4] INFO  

Re: [MarkLogic Dev General] MarkLogic Data Hub Tutorial problems

2017-07-31 Thread Chris Day
HI Geoff,

Great that you are getting across the MarkLogic Data Hub.

Which version of MarkLogic have you got installed to run the Data Hub framework 
against?

Regards,
Chris Day

Chris Day - Sales Engineer
chris@marklogic.com
 

Mobile:  +61 433 370 083

Phone:  +61 2 8315 1556

Skype:  chrisday-aus
Twitter:  @ML_ChrisDay

MarkLogic Pty Ltd
www.marklogic.com

What’s new in MarkLogic 9? MLU self-paced course -  https://goo.gl/tMWkoq

[cid:image001.jpg@01D30AAE.F35C3510]
This e-mail and any accompanying attachments are confidential. The information 
is intended solely for the use of the individual to whom it is addressed. Any 
review, disclosure, copying, distribution, or use of this e-mail communication 
by others is strictly prohibited. If you are not the intended recipient, please 
notify us immediately by returning this message to the sender and delete all 
copies. Thank you for your cooperation.


From:  on behalf of Geoffrey Skellams 

Reply-To: MarkLogic Developer Discussion 
Date: Monday, 31 July 2017 at 3:59 pm
To: "general@developer.marklogic.com" 
Subject: [MarkLogic Dev General] MarkLogic Data Hub Tutorial problems

Afternoon all,

I’m brand new to using MarkLogic, and I’m trying to work my way through the 
MarkLogic Data Hub tutorial on GitHub 
(https://marklogic-community.github.io/marklogic-data-hub/). At this point, I 
am simply just following the instructions as written to get a feel for what the 
process is and make sure that we can get some data into a database correctly.

I’m running MarkLogic on a Windows Server 2016 VM in the Microsoft Azure cloud, 
using the current version of Java 8. Last week I tried using the DataHub 
v.1.1.4 .war file, but ran into errors with it, and thought I had done 
something wrong, so we destroyed the virtual machine, created a brand new one, 
installed the software, but used the v.1.1.3 .war file on advice from 
colleagues who had some success with it last week (but are unable to do so 
again today).


Everything seems to go well, until I get to step 8, ingesting the Acme Tech 
data. The DataHub’s log shows the import as failing, and I’ve included the log 
file below. If I try to ingest the GlobalTech records, I get similar problems 
(although a lot more of them, considering the larger data file size).

It turns out that the error messages from the v1.1.4 hub were the same as the 
ones below.

I’ve tried googling the problem, but can’t seem to find anything that resembles 
this issue.

Can anyone suggest a reason why this is occurring and what we can do to fix it? 
Is it simply a PEBKAC issue (i.e: both myself and my colleague have somehow 
missed important steps), or does the tutorial documentation not match up with 
the latest versions of the hub?


- BEGIN LOG FILE CONTENTS -
8:22.876 [main] INFO  c.m.contentpump.LocalJobRunner - Content type: JSON
03:48:24.043 [main] INFO  c.marklogic.contentpump.ContentPump - Job name: 
local_702976126_1
03:48:24.076 [main] INFO  c.m.c.FileAndDirectoryInputFormat - Total input paths 
to process : 2
03:48:25.552 [pool-1-thread-2] ERROR c.m.contentpump.TransformWriter - 
QueryException:XDMP-AS: (err:XPTY0004) $transform-option as map:map? -- Invalid 
coercion: "/34324.json" as map:map
03:48:25.552 [pool-1-thread-2] WARN  c.m.contentpump.TransformWriter - Failed 
document /34324.json in file:/C:/data-hub/input/AcmeTech/34324.json
03:48:25.555 [pool-1-thread-1] ERROR c.m.contentpump.TransformWriter - 
QueryException:XDMP-AS: (err:XPTY0004) $transform-option as map:map? -- Invalid 
coercion: "/32920.json" as map:map
03:48:25.555 [pool-1-thread-1] WARN  c.m.contentpump.TransformWriter - Failed 
document /32920.json in file:/C:/data-hub/input/AcmeTech/32920.json
03:48:25.564 [Thread-4] INFO  c.m.contentpump.LocalJobRunner -  completed 100%
03:48:25.575 [main] INFO  c.m.contentpump.LocalJobRunner - 
com.marklogic.mapreduce.MarkLogicCounter:
03:48:25.576 [main] INFO  c.m.contentpump.LocalJobRunner - INPUT_RECORDS: 2
03:48:25.576 [main] INFO  c.m.contentpump.LocalJobRunner - OUTPUT_RECORDS: 2
03:48:25.577 [main] INFO  c.m.contentpump.LocalJobRunner - 
OUTPUT_RECORDS_COMMITTED: 0
03:48:25.577 [main] INFO  c.m.contentpump.LocalJobRunner - 
OUTPUT_RECORDS_FAILED: 2
03:48:25.578 [main] INFO  c.m.contentpump.LocalJobRunner - Total execution 
time: 1 sec


- END LOG FILE CONTENTS -

Regards
Geoff



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 

Re: [MarkLogic Dev General] Issues with MarkLogic Function in SPARQL Queries in Query Console

2017-07-31 Thread Steven Anderson
Yup, that worked, thanks.  Any ideas on why the fn: namespace version isn't
working?

On Mon, Jul 31, 2017 at 1:29 PM, Christopher Hamlin 
wrote:

> I removed the trailing / in the function name here (after 'starts-with'):
>
> ( ?o, "sf" ) )
>
> and the error went away.  Does that work for you?
>
> ___
> General mailing list
> General@developer.marklogic.com
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>


-- 

 Steve
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Issues with MarkLogic Function in SPARQL Queries in Query Console

2017-07-31 Thread Christopher Hamlin
I removed the trailing / in the function name here (after 'starts-with'):

( ?o, "sf" ) )

and the error went away.  Does that work for you?
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Possible to Create Multi-Tagname Range Indexes Using admin Functions?

2017-07-31 Thread Mary Holstege

If you manually create an instance of db:range-element-index instead of using 
the constructor function, where in the localname element you have a 
space-separated list of the localnames you can do it. (If they have separate 
namespace URIs too, you need to separate them).  You should make sure you have 
something schema-valid per database.xsd.

//Mary


From: general-boun...@developer.marklogic.com 
[general-boun...@developer.marklogic.com] on behalf of Eliot Kimber 
[ekim...@contrext.com]
Sent: Monday, July 31, 2017 10:15 AM
To: MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Possible to Create Multi-Tagname Range Indexes 
Using admin Functions?

Using ML 8 I’m setting up a script to configure a large number of range indexes.

If I do it manually via the UI I can create a single range index configuration 
that lists multiple tag names.

However, this doesn’t appear to be possible with the admin API using 
admin:database-add-range-element-index().

I’m passing multiple range index definitions to a single call of 
admin:database-add-range-element-index() but the result in the UI is still one 
range index configuration per element name:

declare function local:configure-range-element-indexes(
   $config as element(),
   $db-id as xs:integer,
   $datatype as xs:string,
   $namespace as xs:string?,
   $tagnames as xs:string*
) as element() {
   let $indexes as element()* :=
   for $tagname in $tagnames
   return admin:database-range-element-index(
  $datatype,
  $namespace,
  $tagname,
  "http://marklogic.com/collation/;,
  false(),
  "reject")

   let $new-config :=
 admin:database-add-range-element-index(
$config,
$db-id,
$indexes)
   return $new-config
};

Some of these tag name lists are quite long, reflecting logical groupings of 
element types, so it would be nice to have them grouped under single 
definitions in the UI for the benefit of people inspecting the configuration.

Is what I want to do possible?

Thanks,

Eliot

--
Eliot Kimber
http://contrext.com




___
General mailing list
General@developer.marklogic.com
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] Issues with MarkLogic Function in SPARQL Queries in Query Console

2017-07-31 Thread Steve Anderson
I'm trying to use MarkLogic functions in SPARQL queries.   According to
https://docs.marklogic.com/guide/semantics/semantic-searches

"In addition to SPARQL functions, you can use XQuery or JavaScript built-in
functions (for example, functions with the prefix fn, cts, math, or xdmp)
in a SPARQL query where you can use a function, which includes FILTER, BIND,
and the expressions in a SELECT statement."

It appears to work in the query console, but only intermittently.  Here's a
small repeatable test case.

For example, this, based on the example, works

PREFIX cts: 
SELECT ?o
WHERE
{
  ?s ?p ?o
  FILTER (cts:contains(?o, cts:word-query(("sf"
}

But this, also based on the example, does not

SELECT ?o
WHERE
{
  ?s ?p ?o
   FILTER (( ?o, "sf"
) )
}

Replace "sf" with a string of your choosing.

It returns a stack trace with "[1.0-ml] XDMP-UNDFUN: (err:XPST0017)
Undefined function ()"

Stack Trace

At line 5 column 11:
In sem:sparql("SELECT ?oWHERE{ ?s ?p ?o  FILTER
(( ?o, "sf"
))
6. }
7.
At line 4 column 15:
In xdmp:eval("import module namespace amped-qconsole = 
http://marklogic;, (fn:QName("","query"), "SELECT
?oWHERE{ ?s ?p ?o  FILTER (( ?o, "sf"
))
6. }

In the first grouping, the < before http is highlighted on line 5 and in
the second line 4 is highlighted.

I also tried using the fn: namespace:

PREFIX fn: 
SELECT ?o
WHERE
{
  ?s ?p ?o
   FILTER (fn:starts-with( ?o, "sf" ))
}

And that returns "[1.0-ml] XDMP-UNDFUN: (err:XPST0017) Undefined function
starts-with()"   I've also tired fn:contains with the same result.

This is on Marklogic 8.0-6.4, using developer license, but I also
reproduced it on 9.0-1.1 with an enterprise license.

And yes, before anyone tells me to do this a different way, I know I can do
this in different ways in SPARQL.  I just created a small repeatable query
that illustrates the issue I'm having.

I'm sure I'm doing something wrong, but I'm not sure what.  Can you tell me
what I'm doing wrong?

Thanks,

  Steve
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Search results are same w/ or w/o punctuation with unfiltered search option

2017-07-31 Thread Erik Hennum
Hi, Indrajeet:

Mary Holstege provides a concise and authoritative explanation here:

http://markmail.org/message/r2sdkmjzrawdjpjn

In essence, enable the fast-diacritic-sensitive-searches index (either
for the entire database or a field on the element or property) and
pass the punctuation sensitive (or exact) option on a value query.


Hoping that helps,


Erik Hennum



From: general-boun...@developer.marklogic.com 
[general-boun...@developer.marklogic.com] on behalf of Indrajeet Verma 
[indrajeet.ve...@gmail.com]
Sent: Monday, July 31, 2017 4:38 AM
To: MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Search results are same w/ or w/o punctuation 
with unfiltered search option

Hi - The search:search() is giving same results for keyword 10, 10%, 10#%@ and 
$10 when I use "unfiltered" search option. Though when I use "filtered" 
search-option, the results are accurate and punctuation is considered in the 
query text.

Is there any way if I can get correct results using "unfiltered" option for the 
query text with punctuation as if I use filtered option the response time 
drastically increases.

Thank You!

Regards,
Indrajeet
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] Possible to Create Multi-Tagname Range Indexes Using admin Functions?

2017-07-31 Thread Eliot Kimber
Using ML 8 I’m setting up a script to configure a large number of range indexes.

If I do it manually via the UI I can create a single range index configuration 
that lists multiple tag names.

However, this doesn’t appear to be possible with the admin API using 
admin:database-add-range-element-index().

I’m passing multiple range index definitions to a single call of 
admin:database-add-range-element-index() but the result in the UI is still one 
range index configuration per element name:

declare function local:configure-range-element-indexes(
   $config as element(),
   $db-id as xs:integer,
   $datatype as xs:string,
   $namespace as xs:string?,
   $tagnames as xs:string*
) as element() {
   let $indexes as element()* :=
   for $tagname in $tagnames
   return admin:database-range-element-index(
  $datatype,
  $namespace,
  $tagname,
  "http://marklogic.com/collation/;,
  false(),
  "reject")

   let $new-config :=
 admin:database-add-range-element-index(
$config,
$db-id,
$indexes)
   return $new-config
};

Some of these tag name lists are quite long, reflecting logical groupings of 
element types, so it would be nice to have them grouped under single 
definitions in the UI for the benefit of people inspecting the configuration.

Is what I want to do possible?

Thanks,

Eliot

--
Eliot Kimber
http://contrext.com
 



___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] Search results are same w/ or w/o punctuation with unfiltered search option

2017-07-31 Thread Indrajeet Verma
Hi - The search:search() is giving same results for keyword 10, 10%, 10#%@
and $10 when I use "unfiltered" search option. Though when I use "filtered"
search-option, the results are accurate and punctuation is considered in
the query text.

Is there any way if I can get correct results using "unfiltered" option for
the query text with punctuation as if I use filtered option the response
time drastically increases.

Thank You!

Regards,
Indrajeet
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general