Re: [MarkLogic Dev General] Regarding Error in Marklogic Node

2016-11-15 Thread Justin Makeig
As the error message indicates, you should contact MarkLogic Support 
.

Justin

> On Nov 15, 2016, at 9:14 PM, Mani, Sivasubramani (ELS)  
> wrote:
> 
> Hi Team,
>  
> We have marklogic server with four nodes and We use first Node for ingestion 
> process using xdbc connector and that Node shows the following error
> “You've encountered an error in the server. If you have a maintenance 
> contract, you can open a support ticket by copying the text below and 
> emailing supp...@marklogic.com. Otherwise, please see our community Q & A 
> resources for help with this issue:
> 500: Internal Server Error
> XDMP-AS: (err:XPTY0004) $val as item() -- Invalid coercion: () as item()
> In /host-status.xqy on line 259
> In displayForm()
> $host = xs:unsignedLong("11572374834953542582")
> $snode = ()
> $sstats = ()
> $timenodes = ()
> In /host-status.xqy on line 946
> In hostStatusPage()
> In /host-status.xqy on line 963
> “ The application is in production and I am not able access it. Kindly do the 
> needful.
>  
> Thanks & Regards,
> Siva
>  
> ___
> 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] Regarding Error in Marklogic Node

2016-11-15 Thread Mani, Sivasubramani (ELS)
Hi Team,

We have marklogic server with four nodes and We use first Node for ingestion 
process using xdbc connector and that Node shows the following error
"You've encountered an error in the server. If you have a maintenance contract, 
you can open a support ticket by copying the text below and emailing 
supp...@marklogic.com. Otherwise, please see our community Q & A 
resources for help with this issue:
500: Internal Server Error
XDMP-AS: (err:XPTY0004) $val as item() -- Invalid coercion: () as item()
In /host-status.xqy on line 259
In displayForm()
$host = xs:unsignedLong("11572374834953542582")
$snode = ()
$sstats = ()
$timenodes = ()
In /host-status.xqy on line 946
In hostStatusPage()
In /host-status.xqy on line 963
" The application is in production and I am not able access it. Kindly do the 
needful.

Thanks & Regards,
Siva

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


Re: [MarkLogic Dev General] Regarding one of the Marklogic Node is down

2016-11-15 Thread kirti singh
Hi Siva,

Have you configured replicas for the database so that your database is
available even with a node failure?

You can check the database availability from status page

The replicas must also be created for system and other databases like
modules.

The logs on the node can help you identify the reason for the node going
offline.

On Nov 16, 2016 12:53 PM, "Mani, Sivasubramani (ELS)" 
wrote:

> Hi Team,
>
>
>
> We have a Marklogic Server with Four Node and one of the node refused to
> connect and shows following error “*This host is down. The following
> error occured while trying to contact it: *
> * XDMP-HOSTOFFLINE: Host is offline or not responding*” and application
> server is hosted in all four nodes and Now I am not able to access the
> application also and the application server shows following error “*Could
> not start this app server on the following hosts: These hosts appear to be
> down*”. The application is in production and end users not able to access
> the application.
>
> kindly do the needful. Thanks in advance.
>
>
>
> Thanks & Regards,
>
> Siva
>
>
>
> ___
> 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] Regarding one of the Marklogic Node is down

2016-11-15 Thread Mani, Sivasubramani (ELS)
Hi Team,

We have a Marklogic Server with Four Node and one of the node refused to 
connect and shows following error "This host is down. The following error 
occured while trying to contact it:
XDMP-HOSTOFFLINE: Host is offline or not responding" and application server is 
hosted in all four nodes and Now I am not able to access the application also 
and the application server shows following error "Could not start this app 
server on the following hosts: These hosts appear to be down". The application 
is in production and end users not able to access the application.
kindly do the needful. Thanks in advance.

Thanks & Regards,
Siva

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


Re: [MarkLogic Dev General] Re Question #2: MarkLogic 8 Query Parsing issues in search:search-Need Help

2016-11-15 Thread Karunanithi, Bharathi
Okay Geert, We will discuss and reach out to you if an RFE is required from our 
end.

From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten
Sent: Tuesday, November 15, 2016 6:39 PM
To: MarkLogic Developer Discussion
Cc: Vasiadis, Demetrios
Subject: Re: [MarkLogic Dev General] Re Question #2: MarkLogic 8 Query Parsing 
issues in search:search-Need Help

Sorry, I see no options. The return-query flag is tucked deep into the search 
lib.

If you consider this a serious restriction, I'd advice reaching out via your 
MarkLogic support channels, and ask to get an RFE (Request for Enhancement) 
raised..

Cheers,
Geert

From: 
mailto:general-boun...@developer.marklogic.com>>
 on behalf of "Karunanithi, Bharathi" 
mailto:bharathi_karunani...@condenast.com>>
Reply-To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Date: Tuesday, November 15, 2016 at 1:02 PM
To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Cc: "Vasiadis, Demetrios" 
mailto:demetrios_vasia...@condenast.com>>
Subject: Re: [MarkLogic Dev General] Re Question #2: MarkLogic 8 Query Parsing 
issues in search:search-Need Help

Thanks Geert. Yes, Now I am able to see the annotated query using 
"cts:annotated-query" option in search:parse.

But I need this to be returned in search:search response when the 
 flag is set to "true". But by default, this is returning a 
"cts-query" not the annotated query.

So as you suggested ,  got the annotated query separately using the 
"cts:annotated-query" option in search:parse as highlighted below:


{search:search($query, 
$options,0,1)}
{search:parse($query, $options, 
"cts:annotated-query")}


This again results in an extra step to get the annotated-query. Can we get an 
annotated-query in search:search response in a single step(results as well as 
the annotated query as a single response)?

Thanks,
Bharathi K
From: 
general-boun...@developer.marklogic.com
 [mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten
Sent: Tuesday, November 15, 2016 1:16 AM
To: MarkLogic Developer Discussion
Cc: Vasiadis, Demetrios
Subject: [MarkLogic Dev General] Re Question #2: MarkLogic 8 Query Parsing 
issues in search:search-Need Help

Hi Bharathi,

Regarding question #2, I think you refer to the cts:query annotations that 
where originally used for search:unparse. Search:unparse has been deprecated 
though (see http://docs.marklogic.com/search:unparse), hence the change in the 
default behavior of search:parse. You can still get the annotated cts:query by 
providing an extra flag. Just append , "cts:annotated-query" to the call to 
search:parse. See also the example shown in above link..

Cheers,
Geert

From: 
mailto:general-boun...@developer.marklogic.com>>
 on behalf of "Karunanithi, Bharathi" 
mailto:bharathi_karunani...@condenast.com>>
Reply-To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Date: Monday, November 14, 2016 at 4:53 PM
To: "general@developer.marklogic.com" 
mailto:general@developer.marklogic.com>>
Cc: "Vasiadis, Demetrios" 
mailto:demetrios_vasia...@condenast.com>>
Subject: [MarkLogic Dev General] MarkLogic 8 Query Parsing issues in 
search:search-Need Help

Hi Team,
We are doing an Application migration from MarkLogic 5.0-5 to 8.0-4. In which 
we observe certain query parsing issues.
Issue:

We have been getting no results for the:

query string: publication:"Bon Appetit" AND coverDisplayDate:"October 2016" AND 
regionName:"United States" AND source:"Pre-press"

Some parameters returned are different between ML versions.

Sample Query Snippet:
import module namespace model = "http://condenast.com/dam/2.0/model/montrose"; 
at "/application/model/montrose-model.xqy";
import module namespace search = "http://marklogic.com/appservices/search"; at 
"/MarkLogic/appservices/search/search.xqy";
declare namespace cndam = "http://condenast.com/dam/2.0";;

 let $query := 'publication:"Bon Appetit" AND coverDisplayDate:"October 2016" 
AND regionName:"United States" AND source:"Pre-press"'
return search:parse($query, model:build-all-options("Image"))

Attaching the search options used.(please refer options.txt)

ML5 result:
http://marklogic.com/cts"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
  

  
http://condenast.com/dam/2.0";>_1:publicationName

http://www.w3.org/2001/XMLSchema-instance";>Bon Appetit

collation=http://marklogic.com/collation/codepoint
  
  
http://condenast.com/dam/2.0";>_1:coverDisplayDate

October 2016
  


  http://condenast.com/dam/2.0";>_1:region
  
  http://www.w3.org/2001/XMLSchema-instance";>United States
  
collatio

Re: [MarkLogic Dev General] Re Question #1: MarkLogic 8 Query Parsing issues in search:search-Need Help

2016-11-15 Thread Karunanithi, Bharathi
Thank you Geert for explaining , will add an extra constraint.

From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten
Sent: Tuesday, November 15, 2016 6:33 PM
To: MarkLogic Developer Discussion
Cc: Vasiadis, Demetrios
Subject: Re: [MarkLogic Dev General] Re Question #1: MarkLogic 8 Query Parsing 
issues in search:search-Need Help

I think it was considered a bug in ML5. Using the extra constraint it should 
work the same in both ML5 and ML8..

Cheers,
Geert

From: 
mailto:general-boun...@developer.marklogic.com>>
 on behalf of "Karunanithi, Bharathi" 
mailto:bharathi_karunani...@condenast.com>>
Reply-To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Date: Tuesday, November 15, 2016 at 12:53 PM
To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Cc: "Vasiadis, Demetrios" 
mailto:demetrios_vasia...@condenast.com>>
Subject: Re: [MarkLogic Dev General] Re Question #1: MarkLogic 8 Query Parsing 
issues in search:search-Need Help

Thanks Geert. Getting results and the query is parsed after adding the 
constraint for "source".

But this seems to be working fine even when there is no constraint added for 
"source" in ML5.

From: 
general-boun...@developer.marklogic.com
 [mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten
Sent: Tuesday, November 15, 2016 1:10 AM
To: MarkLogic Developer Discussion
Cc: Vasiadis, Demetrios
Subject: [MarkLogic Dev General] Re Question #1: MarkLogic 8 Query Parsing 
issues in search:search-Need Help

Hi Banrathi,

Regarding question #1: try adding a word constraint named 'source':





Cheers,
Geert

From: 
mailto:general-boun...@developer.marklogic.com>>
 on behalf of "Karunanithi, Bharathi" 
mailto:bharathi_karunani...@condenast.com>>
Reply-To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Date: Monday, November 14, 2016 at 4:53 PM
To: "general@developer.marklogic.com" 
mailto:general@developer.marklogic.com>>
Cc: "Vasiadis, Demetrios" 
mailto:demetrios_vasia...@condenast.com>>
Subject: [MarkLogic Dev General] MarkLogic 8 Query Parsing issues in 
search:search-Need Help

Hi Team,
We are doing an Application migration from MarkLogic 5.0-5 to 8.0-4. In which 
we observe certain query parsing issues.
Issue:

We have been getting no results for the:

query string: publication:"Bon Appetit" AND coverDisplayDate:"October 2016" AND 
regionName:"United States" AND source:"Pre-press"

Some parameters returned are different between ML versions.

Sample Query Snippet:
import module namespace model = "http://condenast.com/dam/2.0/model/montrose"; 
at "/application/model/montrose-model.xqy";
import module namespace search = "http://marklogic.com/appservices/search"; at 
"/MarkLogic/appservices/search/search.xqy";
declare namespace cndam = "http://condenast.com/dam/2.0";;

 let $query := 'publication:"Bon Appetit" AND coverDisplayDate:"October 2016" 
AND regionName:"United States" AND source:"Pre-press"'
return search:parse($query, model:build-all-options("Image"))

Attaching the search options used.(please refer options.txt)

ML5 result:
http://marklogic.com/cts"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
  

  
http://condenast.com/dam/2.0";>_1:publicationName

http://www.w3.org/2001/XMLSchema-instance";>Bon Appetit

collation=http://marklogic.com/collation/codepoint
  
  
http://condenast.com/dam/2.0";>_1:coverDisplayDate

October 2016
  


  http://condenast.com/dam/2.0";>_1:region
  
  http://www.w3.org/2001/XMLSchema-instance";>United States
  
collation=http://marklogic.com/collation/codepoint

  
  
Pre-press
  


ML8 result:
http://marklogic.com/cts";>
  
http://condenast.com/dam/2.0";>_1:publicationName
http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>Bon Appetit

collation=http://marklogic.com/collation/codepoint
  
  
http://condenast.com/dam/2.0";>_1:coverDisplayDate
October 2016
  
  
http://condenast.com/dam/2.0";>_1:region
http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>United States

collation=http://marklogic.com/collation/codepoint
  
  
source:Pre-press
case-insensitive
diacritic-insensitive
wildcarded
  


Question 1: Why is there a difference in the query formation for 
source:"Pre-press" in the word-query?

ML5

ML8


Pre-press



source:Pre-press
case-insensitive
diacritic-insensitive
wildcarded
  

Do

Re: [MarkLogic Dev General] Re Question #2: MarkLogic 8 Query Parsing issues in search:search-Need Help

2016-11-15 Thread Geert Josten
Sorry, I see no options. The return-query flag is tucked deep into the search 
lib.

If you consider this a serious restriction, I’d advice reaching out via your 
MarkLogic support channels, and ask to get an RFE (Request for Enhancement) 
raised..

Cheers,
Geert

From: 
mailto:general-boun...@developer.marklogic.com>>
 on behalf of "Karunanithi, Bharathi" 
mailto:bharathi_karunani...@condenast.com>>
Reply-To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Date: Tuesday, November 15, 2016 at 1:02 PM
To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Cc: "Vasiadis, Demetrios" 
mailto:demetrios_vasia...@condenast.com>>
Subject: Re: [MarkLogic Dev General] Re Question #2: MarkLogic 8 Query Parsing 
issues in search:search-Need Help

Thanks Geert. Yes, Now I am able to see the annotated query using 
"cts:annotated-query” option in search:parse.

But I need this to be returned in search:search response when the 
 flag is set to “true”. But by default, this is returning a 
“cts-query” not the annotated query.

So as you suggested ,  got the annotated query separately using the 
“cts:annotated-query” option in search:parse as highlighted below:


{search:search($query, 
$options,0,1)}
{search:parse($query, $options, 
"cts:annotated-query")}


This again results in an extra step to get the annotated-query. Can we get an 
annotated-query in search:search response in a single step(results as well as 
the annotated query as a single response)?

Thanks,
Bharathi K
From: 
general-boun...@developer.marklogic.com
 [mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten
Sent: Tuesday, November 15, 2016 1:16 AM
To: MarkLogic Developer Discussion
Cc: Vasiadis, Demetrios
Subject: [MarkLogic Dev General] Re Question #2: MarkLogic 8 Query Parsing 
issues in search:search-Need Help

Hi Bharathi,

Regarding question #2, I think you refer to the cts:query annotations that 
where originally used for search:unparse. Search:unparse has been deprecated 
though (see http://docs.marklogic.com/search:unparse), hence the change in the 
default behavior of search:parse. You can still get the annotated cts:query by 
providing an extra flag. Just append , "cts:annotated-query” to the call to 
search:parse. See also the example shown in above link..

Cheers,
Geert

From: 
mailto:general-boun...@developer.marklogic.com>>
 on behalf of "Karunanithi, Bharathi" 
mailto:bharathi_karunani...@condenast.com>>
Reply-To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Date: Monday, November 14, 2016 at 4:53 PM
To: "general@developer.marklogic.com" 
mailto:general@developer.marklogic.com>>
Cc: "Vasiadis, Demetrios" 
mailto:demetrios_vasia...@condenast.com>>
Subject: [MarkLogic Dev General] MarkLogic 8 Query Parsing issues in 
search:search-Need Help

Hi Team,
We are doing an Application migration from MarkLogic 5.0-5 to 8.0-4. In which 
we observe certain query parsing issues.
Issue:

We have been getting no results for the:

query string: publication:"Bon Appetit" AND coverDisplayDate:"October 2016" AND 
regionName:"United States" AND source:"Pre-press"

Some parameters returned are different between ML versions.

Sample Query Snippet:
import module namespace model = "http://condenast.com/dam/2.0/model/montrose"; 
at "/application/model/montrose-model.xqy";
import module namespace search = "http://marklogic.com/appservices/search"; at 
"/MarkLogic/appservices/search/search.xqy";
declare namespace cndam = "http://condenast.com/dam/2.0";;

 let $query := 'publication:"Bon Appetit" AND coverDisplayDate:"October 2016" 
AND regionName:"United States" AND source:"Pre-press"'
return search:parse($query, model:build-all-options("Image"))

Attaching the search options used.(please refer options.txt)

ML5 result:
http://marklogic.com/cts"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
  

  
http://condenast.com/dam/2.0";>_1:publicationName

http://www.w3.org/2001/XMLSchema-instance";>Bon Appetit

collation=http://marklogic.com/collation/codepoint
  
  
http://condenast.com/dam/2.0";>_1:coverDisplayDate

October 2016
  


  http://condenast.com/dam/2.0";>_1:region
  
  http://www.w3.org/2001/XMLSchema-instance";>United States
  
collation=http://marklogic.com/collation/codepoint

  
  
Pre-press
  


ML8 result:
http://marklogic.com/cts";>
  
http://condenast.com/dam/2.0";>_1:publicationName
http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>Bon Appetit

collation=http://marklogic.com/collation/codepoint

Re: [MarkLogic Dev General] Re Question #1: MarkLogic 8 Query Parsing issues in search:search-Need Help

2016-11-15 Thread Geert Josten
I think it was considered a bug in ML5. Using the extra constraint it should 
work the same in both ML5 and ML8..

Cheers,
Geert

From: 
mailto:general-boun...@developer.marklogic.com>>
 on behalf of "Karunanithi, Bharathi" 
mailto:bharathi_karunani...@condenast.com>>
Reply-To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Date: Tuesday, November 15, 2016 at 12:53 PM
To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Cc: "Vasiadis, Demetrios" 
mailto:demetrios_vasia...@condenast.com>>
Subject: Re: [MarkLogic Dev General] Re Question #1: MarkLogic 8 Query Parsing 
issues in search:search-Need Help

Thanks Geert. Getting results and the query is parsed after adding the 
constraint for “source”.

But this seems to be working fine even when there is no constraint added for 
“source” in ML5.

From: 
general-boun...@developer.marklogic.com
 [mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten
Sent: Tuesday, November 15, 2016 1:10 AM
To: MarkLogic Developer Discussion
Cc: Vasiadis, Demetrios
Subject: [MarkLogic Dev General] Re Question #1: MarkLogic 8 Query Parsing 
issues in search:search-Need Help

Hi Banrathi,

Regarding question #1: try adding a word constraint named ’source’:

mailto:general-boun...@developer.marklogic.com>>
 on behalf of "Karunanithi, Bharathi" 
mailto:bharathi_karunani...@condenast.com>>
Reply-To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Date: Monday, November 14, 2016 at 4:53 PM
To: "general@developer.marklogic.com" 
mailto:general@developer.marklogic.com>>
Cc: "Vasiadis, Demetrios" 
mailto:demetrios_vasia...@condenast.com>>
Subject: [MarkLogic Dev General] MarkLogic 8 Query Parsing issues in 
search:search-Need Help

Hi Team,
We are doing an Application migration from MarkLogic 5.0-5 to 8.0-4. In which 
we observe certain query parsing issues.
Issue:

We have been getting no results for the:

query string: publication:"Bon Appetit" AND coverDisplayDate:"October 2016" AND 
regionName:"United States" AND source:"Pre-press"

Some parameters returned are different between ML versions.

Sample Query Snippet:
import module namespace model = "http://condenast.com/dam/2.0/model/montrose"; 
at "/application/model/montrose-model.xqy";
import module namespace search = "http://marklogic.com/appservices/search"; at 
"/MarkLogic/appservices/search/search.xqy";
declare namespace cndam = "http://condenast.com/dam/2.0";;

 let $query := 'publication:"Bon Appetit" AND coverDisplayDate:"October 2016" 
AND regionName:"United States" AND source:"Pre-press"'
return search:parse($query, model:build-all-options("Image"))

Attaching the search options used.(please refer options.txt)

ML5 result:
http://marklogic.com/cts"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
  

  
http://condenast.com/dam/2.0";>_1:publicationName

http://www.w3.org/2001/XMLSchema-instance";>Bon Appetit

collation=http://marklogic.com/collation/codepoint
  
  
http://condenast.com/dam/2.0";>_1:coverDisplayDate

October 2016
  


  http://condenast.com/dam/2.0";>_1:region
  
  http://www.w3.org/2001/XMLSchema-instance";>United States
  
collation=http://marklogic.com/collation/codepoint

  
  
Pre-press
  


ML8 result:
http://marklogic.com/cts";>
  
http://condenast.com/dam/2.0";>_1:publicationName
http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>Bon Appetit

collation=http://marklogic.com/collation/codepoint
  
  
http://condenast.com/dam/2.0";>_1:coverDisplayDate
October 2016
  
  
http://condenast.com/dam/2.0";>_1:region
http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>United States

collation=http://marklogic.com/collation/codepoint
  
  
source:Pre-press
case-insensitive
diacritic-insensitive
wildcarded
  


Question 1: Why is there a difference in the query formation for 
source:”Pre-press” in the word-query?

ML5

ML8


Pre-press



source:Pre-press
case-insensitive
diacritic-insensitive
wildcarded
  

Do we miss any of the ML configuration which renders such a query formation in 
ML8?
I have been trying to pass only “Pre-press” as the query string instead of 
‘source:”Pre-press”’. Though it fetches the results, it breaks the facets 
response in search:response , the concept behind is we need to apply a source 
filter and show that it is applied to the front end

Question 2:
In MarkLogic 5: search:parse response is having t

Re: [MarkLogic Dev General] Re Question #2: MarkLogic 8 Query Parsing issues in search:search-Need Help

2016-11-15 Thread Karunanithi, Bharathi
Thanks Geert. Yes, Now I am able to see the annotated query using 
"cts:annotated-query" option in search:parse.

But I need this to be returned in search:search response when the 
 flag is set to "true". But by default, this is returning a 
"cts-query" not the annotated query.

So as you suggested ,  got the annotated query separately using the 
"cts:annotated-query" option in search:parse as highlighted below:


{search:search($query, 
$options,0,1)}
{search:parse($query, $options, 
"cts:annotated-query")}


This again results in an extra step to get the annotated-query. Can we get an 
annotated-query in search:search response in a single step(results as well as 
the annotated query as a single response)?

Thanks,
Bharathi K
From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten
Sent: Tuesday, November 15, 2016 1:16 AM
To: MarkLogic Developer Discussion
Cc: Vasiadis, Demetrios
Subject: [MarkLogic Dev General] Re Question #2: MarkLogic 8 Query Parsing 
issues in search:search-Need Help

Hi Bharathi,

Regarding question #2, I think you refer to the cts:query annotations that 
where originally used for search:unparse. Search:unparse has been deprecated 
though (see http://docs.marklogic.com/search:unparse), hence the change in the 
default behavior of search:parse. You can still get the annotated cts:query by 
providing an extra flag. Just append , "cts:annotated-query" to the call to 
search:parse. See also the example shown in above link..

Cheers,
Geert

From: 
mailto:general-boun...@developer.marklogic.com>>
 on behalf of "Karunanithi, Bharathi" 
mailto:bharathi_karunani...@condenast.com>>
Reply-To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Date: Monday, November 14, 2016 at 4:53 PM
To: "general@developer.marklogic.com" 
mailto:general@developer.marklogic.com>>
Cc: "Vasiadis, Demetrios" 
mailto:demetrios_vasia...@condenast.com>>
Subject: [MarkLogic Dev General] MarkLogic 8 Query Parsing issues in 
search:search-Need Help

Hi Team,
We are doing an Application migration from MarkLogic 5.0-5 to 8.0-4. In which 
we observe certain query parsing issues.
Issue:

We have been getting no results for the:

query string: publication:"Bon Appetit" AND coverDisplayDate:"October 2016" AND 
regionName:"United States" AND source:"Pre-press"

Some parameters returned are different between ML versions.

Sample Query Snippet:
import module namespace model = "http://condenast.com/dam/2.0/model/montrose"; 
at "/application/model/montrose-model.xqy";
import module namespace search = "http://marklogic.com/appservices/search"; at 
"/MarkLogic/appservices/search/search.xqy";
declare namespace cndam = "http://condenast.com/dam/2.0";;

 let $query := 'publication:"Bon Appetit" AND coverDisplayDate:"October 2016" 
AND regionName:"United States" AND source:"Pre-press"'
return search:parse($query, model:build-all-options("Image"))

Attaching the search options used.(please refer options.txt)

ML5 result:
http://marklogic.com/cts"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
  

  
http://condenast.com/dam/2.0";>_1:publicationName

http://www.w3.org/2001/XMLSchema-instance";>Bon Appetit

collation=http://marklogic.com/collation/codepoint
  
  
http://condenast.com/dam/2.0";>_1:coverDisplayDate

October 2016
  


  http://condenast.com/dam/2.0";>_1:region
  
  http://www.w3.org/2001/XMLSchema-instance";>United States
  
collation=http://marklogic.com/collation/codepoint

  
  
Pre-press
  


ML8 result:
http://marklogic.com/cts";>
  
http://condenast.com/dam/2.0";>_1:publicationName
http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>Bon Appetit

collation=http://marklogic.com/collation/codepoint
  
  
http://condenast.com/dam/2.0";>_1:coverDisplayDate
October 2016
  
  
http://condenast.com/dam/2.0";>_1:region
http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>United States

collation=http://marklogic.com/collation/codepoint
  
  
source:Pre-press
case-insensitive
diacritic-insensitive
wildcarded
  


Question 1: Why is there a difference in the query formation for 
source:"Pre-press" in the word-query?

ML5

ML8


Pre-press



source:Pre-press
case-insensitive
diacritic-insensitive
wildcarded
  

Do we miss any of the ML configuration which renders such a query formation in 
ML8?
I have been trying to pass only "Pre-press" as the query strin

Re: [MarkLogic Dev General] Re Question #1: MarkLogic 8 Query Parsing issues in search:search-Need Help

2016-11-15 Thread Karunanithi, Bharathi
Thanks Geert. Getting results and the query is parsed after adding the 
constraint for "source".

But this seems to be working fine even when there is no constraint added for 
"source" in ML5.

From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten
Sent: Tuesday, November 15, 2016 1:10 AM
To: MarkLogic Developer Discussion
Cc: Vasiadis, Demetrios
Subject: [MarkLogic Dev General] Re Question #1: MarkLogic 8 Query Parsing 
issues in search:search-Need Help

Hi Banrathi,

Regarding question #1: try adding a word constraint named 'source':





Cheers,
Geert

From: 
mailto:general-boun...@developer.marklogic.com>>
 on behalf of "Karunanithi, Bharathi" 
mailto:bharathi_karunani...@condenast.com>>
Reply-To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Date: Monday, November 14, 2016 at 4:53 PM
To: "general@developer.marklogic.com" 
mailto:general@developer.marklogic.com>>
Cc: "Vasiadis, Demetrios" 
mailto:demetrios_vasia...@condenast.com>>
Subject: [MarkLogic Dev General] MarkLogic 8 Query Parsing issues in 
search:search-Need Help

Hi Team,
We are doing an Application migration from MarkLogic 5.0-5 to 8.0-4. In which 
we observe certain query parsing issues.
Issue:

We have been getting no results for the:

query string: publication:"Bon Appetit" AND coverDisplayDate:"October 2016" AND 
regionName:"United States" AND source:"Pre-press"

Some parameters returned are different between ML versions.

Sample Query Snippet:
import module namespace model = "http://condenast.com/dam/2.0/model/montrose"; 
at "/application/model/montrose-model.xqy";
import module namespace search = "http://marklogic.com/appservices/search"; at 
"/MarkLogic/appservices/search/search.xqy";
declare namespace cndam = "http://condenast.com/dam/2.0";;

 let $query := 'publication:"Bon Appetit" AND coverDisplayDate:"October 2016" 
AND regionName:"United States" AND source:"Pre-press"'
return search:parse($query, model:build-all-options("Image"))

Attaching the search options used.(please refer options.txt)

ML5 result:
http://marklogic.com/cts"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
  

  
http://condenast.com/dam/2.0";>_1:publicationName

http://www.w3.org/2001/XMLSchema-instance";>Bon Appetit

collation=http://marklogic.com/collation/codepoint
  
  
http://condenast.com/dam/2.0";>_1:coverDisplayDate

October 2016
  


  http://condenast.com/dam/2.0";>_1:region
  
  http://www.w3.org/2001/XMLSchema-instance";>United States
  
collation=http://marklogic.com/collation/codepoint

  
  
Pre-press
  


ML8 result:
http://marklogic.com/cts";>
  
http://condenast.com/dam/2.0";>_1:publicationName
http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>Bon Appetit

collation=http://marklogic.com/collation/codepoint
  
  
http://condenast.com/dam/2.0";>_1:coverDisplayDate
October 2016
  
  
http://condenast.com/dam/2.0";>_1:region
http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>United States

collation=http://marklogic.com/collation/codepoint
  
  
source:Pre-press
case-insensitive
diacritic-insensitive
wildcarded
  


Question 1: Why is there a difference in the query formation for 
source:"Pre-press" in the word-query?

ML5

ML8


Pre-press



source:Pre-press
case-insensitive
diacritic-insensitive
wildcarded
  

Do we miss any of the ML configuration which renders such a query formation in 
ML8?
I have been trying to pass only "Pre-press" as the query string instead of 
'source:"Pre-press"'. Though it fetches the results, it breaks the facets 
response in search:response , the concept behind is we need to apply a source 
filter and show that it is applied to the front end

Question 2:
In MarkLogic 5: search:parse response is having the facet information. Along 
with this, we find search:query which contains all the currently selected 
facets and the search terms with the facet names and values in qtextpre and 
qtextpost, and in the cts:text.
But in ML8, this structure is more generic as seen below, we could not find the 
aaplied facet name details in the new xml structure. Attaching the logic used 
in the application to build the facets from search:response.(please refer 
build-facets.xqy)

http://marklogic.com/appservices/search";>

Bon 
Appetit


Pre-press


United Stat

Re: [MarkLogic Dev General] Hash of pdf

2016-11-15 Thread Geert Josten
Hi Pragya,

Would you prefer to detect the uniqueness of the pdf entirely, or detect 
textual changes only? For the first you’d just take the hash of the binary, 
that allows finding duplicates. For the latter you could apply 
xdmp:pdf-convert, or xdmp:document-filter. Both should return textual contents 
as HTML.

Note though that text is not extracted from PDF images..

Cheers,
Geert

From: 
mailto:general-boun...@developer.marklogic.com>>
 on behalf of "Kapoor, Pragya" 
mailto:pkapo...@innodata.com>>
Reply-To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Date: Tuesday, November 15, 2016 at 10:15 AM
To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Subject: Re: [MarkLogic Dev General] Hash of pdf


Thanks Greet

But how would the text of pdf could be converted to string, so that it could be 
used in xdmp:sha256, using xquery.


From: 
general-boun...@developer.marklogic.com
 
mailto:general-boun...@developer.marklogic.com>>
 on behalf of Geert Josten 
mailto:geert.jos...@marklogic.com>>
Sent: Tuesday, November 15, 2016 2:10:33 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Hash of pdf

Hi Pragya,

I’d use http://docs.marklogic.com/xdmp:sha256, or if you like to combine it 
with a secretkey, xdmp:hmac-sha256..

Cheers,
Geert

From: 
mailto:general-boun...@developer.marklogic.com>>
 on behalf of "Kapoor, Pragya" 
mailto:pkapo...@innodata.com>>
Reply-To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Date: Tuesday, November 15, 2016 at 7:53 AM
To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Subject: [MarkLogic Dev General] Hash of pdf


Hi,


We need to find the hash of pdf file text.

Is this possible in MarkLogic/xquery?


Thanks

Pragya

"This e-mail and any attachments transmitted with it are for the sole use of 
the intended recipient(s) and may contain confidential , proprietary or 
privileged information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. Any 
unauthorized review, use, disclosure, dissemination, forwarding, printing or 
copying of this e-mail or any action taken in reliance on this e-mail is 
strictly prohibited and may be unlawful."
"This e-mail and any attachments transmitted with it are for the sole use of 
the intended recipient(s) and may contain confidential , proprietary or 
privileged information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. Any 
unauthorized review, use, disclosure, dissemination, forwarding, printing or 
copying of this e-mail or any action taken in reliance on this e-mail is 
strictly prohibited and may be unlawful."
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Hash of pdf

2016-11-15 Thread Kapoor, Pragya
Thanks Greet

But how would the text of pdf could be converted to string, so that it could be 
used in xdmp:sha256, using xquery.


From: general-boun...@developer.marklogic.com 
 on behalf of Geert Josten 

Sent: Tuesday, November 15, 2016 2:10:33 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Hash of pdf

Hi Pragya,

I’d use http://docs.marklogic.com/xdmp:sha256, or if you like to combine it 
with a secretkey, xdmp:hmac-sha256..

Cheers,
Geert

From: 
mailto:general-boun...@developer.marklogic.com>>
 on behalf of "Kapoor, Pragya" 
mailto:pkapo...@innodata.com>>
Reply-To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Date: Tuesday, November 15, 2016 at 7:53 AM
To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Subject: [MarkLogic Dev General] Hash of pdf


Hi,


We need to find the hash of pdf file text.

Is this possible in MarkLogic/xquery?


Thanks

Pragya

"This e-mail and any attachments transmitted with it are for the sole use of 
the intended recipient(s) and may contain confidential , proprietary or 
privileged information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. Any 
unauthorized review, use, disclosure, dissemination, forwarding, printing or 
copying of this e-mail or any action taken in reliance on this e-mail is 
strictly prohibited and may be unlawful."
"This e-mail and any attachments transmitted with it are for the sole use of 
the intended recipient(s) and may contain confidential , proprietary or 
privileged information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. Any 
unauthorized review, use, disclosure, dissemination, forwarding, printing or 
copying of this e-mail or any action taken in reliance on this e-mail is 
strictly prohibited and may be unlawful."
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Hash of pdf

2016-11-15 Thread Geert Josten
Hi Pragya,

I’d use http://docs.marklogic.com/xdmp:sha256, or if you like to combine it 
with a secretkey, xdmp:hmac-sha256..

Cheers,
Geert

From: 
mailto:general-boun...@developer.marklogic.com>>
 on behalf of "Kapoor, Pragya" 
mailto:pkapo...@innodata.com>>
Reply-To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Date: Tuesday, November 15, 2016 at 7:53 AM
To: MarkLogic Developer Discussion 
mailto:general@developer.marklogic.com>>
Subject: [MarkLogic Dev General] Hash of pdf


Hi,


We need to find the hash of pdf file text.

Is this possible in MarkLogic/xquery?


Thanks

Pragya

"This e-mail and any attachments transmitted with it are for the sole use of 
the intended recipient(s) and may contain confidential , proprietary or 
privileged information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. Any 
unauthorized review, use, disclosure, dissemination, forwarding, printing or 
copying of this e-mail or any action taken in reliance on this e-mail is 
strictly prohibited and may be unlawful."
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general