[MarkLogic Dev General] MarkLogic error log missing from one node in cluster

2017-09-04 Thread amit gope
Hi Team,

We have a three node ML setup in a cluster and found that the UI
environment became unresponsive. And upon analysis we found that for one
node there were around 100 threads pending and the CPU utilization for the
node was 98.9 %. And the other two nodes had the following errors logged:

2017-09-01 00:27:02.573 Error: PerfMeterTask::run: SVC-EXTIME: Time limit
exceeded
2017-09-01 01:01:01.783 Error: UsageMeterTask::run: SVC-EXTIME: Time limit
exceeded

So we restarted the ML servers around 10 AM IST and UI started working
again. We don't have the errorlog from 12:00 AM till 10 AM . Just wondering
when we restarted the system, there was no logs for node 1 during this
time. And the logs were present for the other two nodes. Please suggest
what would have gone wrong.

And just in case if node 1 was down, what would be the entry in the error
log for such a scenario.

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


[MarkLogic Dev General] Date Time value not correct while using DLS API

2017-07-27 Thread amit gope
Hi Team.

We are using DLS api for one of our projects making different versions of a
given document, when the dls:checkout is happening, the entry that is being
made for the timestamp value is:
http://marklogic.com/xdmp/dls;>
http://www.google.com/metadata/core/00-2754195023.xml

auser
0
1501144206
http://marklogic.com/xdmp/security
">7071164303237443533


When we are using the
format-dateTime/xdmp:timestamp-to-wallclock(xs:unsignedLong(1501144206)) on
the dls:timestamp the date turns out to be 1970-01-01, whereas the checkout
was done today, can you please suggest from where the timestamp is getting
created and why it dates back to 1970?
-- 
Best Regards
Amit
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] Issue with Appservices after ML upgrade to ML9

2017-07-23 Thread amit gope
Hi All,

I am facing issue while trying to access the appservices URL
http://localhost:8000/appservices. All other things working fine, please
suggest what might be going wrong here. The Error that I am seeing is :

Error

An unexpected error has occurred. Check the error log or contact MarkLogic
support .

Message

http://marklogic.com/xdmp/error
error.xsd" xmlns:error="http://marklogic.com/xdmp/error;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;>
  REST-INVALIDREQUEST
  
  1.0-ml
  Invalid request
  REST-INVALIDREQUEST: Invalid request:
AppBuilder request no longer supported:
/appservices
  false
  
  
AppBuilder request no longer supported:
/appservices
  
  

  /MarkLogic/rest-api/8000-rewriter.xml
  1.0-ml

  




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


[MarkLogic Dev General] Roxy request not getting properly redirected.

2016-11-25 Thread amit gope
Hi All,

I am using a roxy configuration and I created an endpoint routing like this
to the list of existing routing definitions:


  
  topics
  
  
  


and I created a controller named topics.xqy, a model named topics-model.xqy
and views topics

This is how my topics contoller looks like

xquery version "1.0-ml";
module namespace c = "http://marklogic.com/roxy/controller/topics;;
import module namespace ch= "http://marklogic.com/roxy/controller-helper;
at "/roxy/lib/controller-helper.xqy";
import module namespace req   = "http://marklogic.com/roxy/request; at
"/roxy/lib/request.xqy";
import module namespace error = "http://marklogic.com/roxy/error-lib; at
"../views/helpers/error-lib.xqy";
import module namespace topics  = "http://marklogic.com/roxy/models/topics;
at "/app/models/topics-model.xqy";

declare option xdmp:mapping "false";
declare variable $RES-TYPE as xs:string := "Topics";
declare variable $ALL-FORMATS as xs:string+ := ("html", "xml", "json",
"text");
(: Default function that is returns an error message :)

declare function c:main() as item()*
{
  error:error-handling( 500, fn:concat("Not supported, not sure why"))

};

declare function c:topics() as item()*
{
let $result := topics:topics("RBO-TOPIC-ROOT","parents","", "ALL")
return (
ch:use-view("topics/topics",$ALL-FORMATS),
ch:add-value("result", $result),
ch:add-value(
  "res-header",
  element header {
element Date {fn:current-dateTime()},
element Location {fn:concat("/",fn:lower-case($RES-TYPE),())},
element Content-Type
{req:get("req-header")/content-type/fn:string()}
  }
)
  )};

The model has the code of getting me the topics as per my application
requirement.

When I make a request through postman like this http://localhost:8018/topics
it always goes to the main function and throws the error, and never goes to
the desired topics function. Why is that so? What mistake am I doing.
Please suggest.

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


[MarkLogic Dev General] Error running large file transformation using MLCP

2016-06-20 Thread amit gope
Hi All,

I am running a mlcp ingestion which involves transformation as well. Its a
txt file which contains many images/html elements and the file size is more
than 100 MB. The ingestion for smaller file size runs fine without error,
but with large files near 100MB, the transformation logic fails and
everytime I get the following error.

Error parsing HTTP headers: A connection attempt failed because the
connected party did not properly respond after a period of time, or
established connection failed because connected host has failed to respond
 [Session: user=admin, cb=FilingsTool-Content [ContentSource: user=admin,
cb=FilingsTool-Content [provider: address=localhost/127.0.0.1:8010,
pool=0/64]]]
 [Client: XCC/8.0-2, Server: XDBC/8.0-5.2]

Please suggest what do I need to do to overcome this issue. I know the
transformation logic is the one which takes most of the time, because I can
load the file as is using MLCP, but any other key that can increase the
chances of getting the file loaded along with the transformation will be
greatly appreciated.

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


[MarkLogic Dev General] URI HTML encoding in mlcp

2015-01-28 Thread amit gope
Hello All,

I am using MLCP to ingest data into ML-7(hosted on Linux). The problem that
I am facing is that when the uri of my document is /home/makrlogic/testing
mlcp.xml, it is rendering the uri as /home/makrlogic/testing%20mlcp.xml.
Now my db already contained document with the uri /home/makrlogic/testing
mlcp.xml, and this new ingestion adds one more uri
/home/makrlogic/testing%mlcp.xml. So when I run the query
cts:uri-match(/home/marklogic/*) it gives me two uris, but ideally it
should only be one. Please suggest how to maintain this white spaces and
not use html entity for the white space.
-- 
Regards
Amit
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] Issue while inserting wrong date value in ML 5.0

2014-05-06 Thread amit gope
Hello All,

I am running my ingestion on a ML 5.0-4.1. I have this element-range-index
enabled for a particular field date. So if I pass the date as
date2014-11-31/date, it shouts for invalid lexical value.

I know that ML 6.0 onwards we have this option where we can mention the
range index to either ignore or reject but I need to get this done on
ML 5. Please suggest how shall i do it?

-- 
Regards
Amit
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] Want to convert IPV6 address to decimal

2013-01-21 Thread amit gope
Hello All,

I want to convert an IPV6 address to its corresponding decimal value, but i
am not able to find the correct way of doing it. Currently what i am doing
is that i am removing the : from the address and then applying
xdmp:hex-to-integer() on the replaced value, but somehow i dont feel it to
be safe. Please suggest

-- 
Regards
Amit
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Preserve space in xdmp:tidy

2012-10-31 Thread amit gope
On 31 October 2012 19:52, general-requ...@developer.marklogic.com wrote:

 Send General mailing list submissions to
 general@developer.marklogic.com

 To subscribe or unsubscribe via the World Wide Web, visit
 http://developer.marklogic.com/mailman/listinfo/general
 or, via email, send a message with subject or body 'help' to
 general-requ...@developer.marklogic.com

 You can reach the person managing the list at
 general-ow...@developer.marklogic.com

 When replying, please edit your Subject line so it is more specific
 than Re: Contents of General digest...

 Today's Topics:

1. Re: Extending error handling (Geert Josten)
2. Re: Extending error handling (Will Thompson)
3. Preserve space in xdmp:tidy (Mihir Das)
4. Re: Preserve space in xdmp:tidy (Mihir Das)
5. Re: Extending error handling (Geert Josten)
6. Path index with namespace in an serializedcts:query node
   (Pascal Cadet)


 -- Forwarded message --
 From: Geert Josten geert.jos...@dayon.nl
 To: MarkLogic Developer Discussion general@developer.marklogic.com
 Cc:
 Date: Tue, 30 Oct 2012 21:57:30 +0100
 Subject: Re: [MarkLogic Dev General] Extending error handling
 Hi Will,

 The default behavior is as far as I know indeed built-in. At least, never
 saw a module that seemed to implement the built-in behavior. But perhaps
 you don't need to reference it from XQuery. I think that any error raised
 in a custom error handler is caught by the built-in one. So, don't write
 output, but always raise a new error through fn:error. You might need to
 fiddle a bit to find a way to pass through exceptions 'untouched' if you
 would like to..

 Kind regards,
 Geert

  -Oorspronkelijk bericht-
  Van: general-boun...@developer.marklogic.com [mailto:general-
  boun...@developer.marklogic.com] Namens Will Thompson
  Verzonden: dinsdag 30 oktober 2012 18:20
  Aan: MarkLogic Developer Discussion
  Onderwerp: [MarkLogic Dev General] Extending error handling
 
  I want to extend the functionality of the existing HTTP error handler,
 but not
  necessarily replace it. I thought at the very least I could make a copy
 of the
  existing error handler, add my extensions, and point the App Server
 there, but I
  can't seem to find the right XQY module. Is the default error handler
 part of the
  executable, not XQY?
 
  -Will
  ___
  General mailing list
  General@developer.marklogic.com
  http://developer.marklogic.com/mailman/listinfo/general



 -- Forwarded message --
 From: Will Thompson wthomp...@jonesmcclure.com
 To: MarkLogic Developer Discussion general@developer.marklogic.com
 Cc:
 Date: Tue, 30 Oct 2012 21:41:33 +
 Subject: Re: [MarkLogic Dev General] Extending error handling
 Thanks Geert. This is ideally what I'd like to do, but there doesn't seem
 to be a way to pass the context of the current exception back to error().
 It is possible to get the error code, name, and description and then
 rethrow. In this case it will raise the error from the error handler
 context.

 Then it's smart enough to print out Old Error followed by a
 pretty-printed xdmp:quote() of the $error:error variable. That's partially
 useful, but it's not clear to me how to wire it so that it rethrows using
 the context of $error:error. As it is, it would be very hard to read the
 error details through sea of XML.

 For now, I have just been trying to reverse engineer current error
 handler, followed by my updates.

 -Will


 -Original Message-
 From: general-boun...@developer.marklogic.com [mailto:
 general-boun...@developer.marklogic.com] On Behalf Of Geert Josten
 Sent: Tuesday, October 30, 2012 1:58 PM
 To: MarkLogic Developer Discussion
 Subject: Re: [MarkLogic Dev General] Extending error handling

 Hi Will,

 The default behavior is as far as I know indeed built-in. At least, never
 saw a module that seemed to implement the built-in behavior. But perhaps
 you don't need to reference it from XQuery. I think that any error raised
 in a custom error handler is caught by the built-in one. So, don't write
 output, but always raise a new error through fn:error. You might need to
 fiddle a bit to find a way to pass through exceptions 'untouched' if you
 would like to..

 Kind regards,
 Geert

  -Oorspronkelijk bericht-
  Van: general-boun...@developer.marklogic.com [mailto:general-
  boun...@developer.marklogic.com] Namens Will Thompson
  Verzonden: dinsdag 30 oktober 2012 18:20
  Aan: MarkLogic Developer Discussion
  Onderwerp: [MarkLogic Dev General] Extending error handling
 
  I want to extend the functionality of the existing HTTP error handler,
 but not
  necessarily replace it. I thought at the very least I could make a
  copy
 of the
  existing error handler, add my extensions, and point the App Server
 there, but I
  can't seem to find the right XQY module. Is the default error handler
 part of the
  executable, not 

[MarkLogic Dev General] sarch api not generating result for non english content

2012-10-27 Thread amit gope
Hello All,

I am using search api to find my contents and facing some issue. My search
options query looks something like this:

options xmlns=http://marklogic.com/appservices/search;
 term
empty apply=no-results /
term-optioncase-insensitive/term-option
term-optionpunctuation-insensitive/term-option
/term
 !-- search contraints --
constraint name=doi-unstm
value
element ns=http://www.springer.com/app/meta; name=DOI/
term-optionunstemmed/term-option
/value
/constraint
 constraint name=doi-stm
value
element ns=http://www.springer.com/app/meta; name=DOI/
term-optionstemmed/term-option
/value
/constraint
  !-- results options --
return-metricsfalse/return-metrics
return-facetstrue/return-facets
searchable-expression/Publisher/searchable-expression
  !-- results transformation --
transform-results apply=raw/
 !-- additional query to only return enabled images --
additional-query{cts:or-query((

cts:element-attribute-value-query(fn:QName(,ArticleGrants),fn:QName(,Type),OpenChoice),

cts:element-attribute-value-query(fn:QName(,ChapterGrants),fn:QName(,Type),OpenChoice)
)) }/additional-query
/options;

The problem that i am facing is that the results are being fetched for
english content documents but for non english contents it fails to return
me result for the DOI search. When I remove the additional query from my
search option i get the result but i want the additional query as the query
is made against Articles which are of type OpenChoice. Please suggest where
i am going wrong and what should i change to make my query work?

-- 
Regards
Amit
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Issue with search api constraints

2012-09-30 Thread amit gope
 What i am trying to achieve is to provide a term option of unstemmed  to
the constraints so that i get non-English documents. For example in my
search option i have  constraints defined as ::
term
empty apply=no-results /
term-optioncase-insensitive/term-option
/term
 !-- search contraints --
constraint name=doi
value
element ns=http://www.marklogic.com/app/meta; name=DOI/
term-optionunstemmed/term-option
/value
/constraint
 constraint name=metapressid
!--element-query ns=http://www.marklogic.com/app/meta;
name=MetaPressId /--
value
element ns=http://www.marklogic.com/app/meta; name=MetaPressId/
term-optionunstemmed/term-option
/value
/constraint

constraint name=title
word
element ns=http://www.marklogic.com/app/meta; name=Title/
term-optionunstemmed/term-option
/word
/constraint
 constraint name=isbn
value
element ns=http://www.marklogic.com/app/meta; name=ISXN/
term-optionunstemmed/term-option
/value
/constraint
 constraint name=issn
value
element ns=http://www.marklogic.com/app/meta; name=ISXN/
term-optionunstemmed/term-option
/value
/constraint
 constraint name=orgname
word
element ns=http://www.marklogic.com/app/meta; name=OrgName/
term-optionunstemmed/term-option
/word
/constraint
 constraint name=journal
word
element ns=http://www.marklogic.com/app/meta; name=Journal/
term-optioncase-insensitive/term-option
term-optionunstemmed/term-option
/word
/constraint
 constraint name=book
word
element ns=http://www.marklogic.com/app/meta; name=Book/
term-optionunstemmed/term-option
/word
/constraint
 constraint name=name
word
element ns=http://www.marklogic.com/app/meta; name=Author/
term-optionunstemmed/term-option
/word
/constraint
 constraint name=date
range type=xs:date facet=false
element ns=http://www.marklogic.com/app/meta; name=Date/
term-optionunstemmed/term-option
/range
/constraint
 constraint name=volume
  value
element ns=
http://www.marklogic.com/app/meta; name=VolumeId/
term-optionunstemmed/term-option
/value
/constraint

constraint name=issue
  value
element ns=
http://www.marklogic.com/app/meta; name=IssueId/
term-optionunstemmed/term-option
/value
/constraint

so whenever i supply the query text based on the above constraints i get
the non-English document results along with the English contents. For
example if my application URL is
http://myapi.com/metadata?q=book:Physicss=19p=10 i get results of
non-English document along with English documents.

 But in my search option i also have constraints as ::
constraint name=subject
range type=xs:string collation=http://marklogic.com/collation/;
facet=true
element ns=http://www.marklogic.com/app/meta; name=Subject/
facet-optionfrequency-order/facet-option
facet-optiondescending/facet-option
/range
/constraint
 constraint name=keyword
range type=xs:string collation=http://marklogic.com/collation/;
facet=true
element ns= name=Keyword /
facet-optionfrequency-order/facet-option
facet-optiondescending/facet-option
/range
/constraint
 constraint name=pub
range type=xs:string collation=http://marklogic.com/collation/;
facet=true
element ns=http://www.marklogic.com/app/meta; name=Publication /
facet-optionfrequency-order/facet-option
facet-optiondescending/facet-option
/range
/constraint
 constraint name=year
collection prefix=/collections/year/
facet-optiondescending/facet-option
/collection
/constraint
 constraint name=country
range type=xs:string collation=http://marklogic.com/collation/;
facet=true
element ns=http://www.marklogic.com/app/meta; name=Country/
facet-optionfrequency-order/facet-option
facet-optiondescending/facet-option
/range
/constraint

constraint name=type
range type=xs:string collation=http://marklogic.com/collation/;
facet=true
element ns=http://www.marklogic.com/app/meta; name=PublicationType /
facet-optionfrequency-order/facet-option
facet-optiondescending/facet-option
/range
/constraint

Now when my request becomes
http://myapi.com/metadata?q=book:Physicssubject:Lights=19p=10 i only
get results from the English contents.
Please suggest how to get the results for these constraints.

On 27 September 2012 22:05, amit gope amitgo...@gmail.com wrote:

 Hello All,

 I want to apply unstemmed option to a range constraint. The reason being
 is that when I use the condition term-optionunstemmed/term-option
 against word or value, I get back non-English documents in the result set
 but since I cannot apply this to a range constraint or to a collection,
 hence I don't get the non-English documents in the result set. Please
 explain how to achieve this.



 --
 Regards
 Amit





-- 
Regards
Amit
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] Issue with search api constraints

2012-09-27 Thread amit gope
Hello All,

I want to apply unstemmed option to a range constraint. The reason being
is that when I use the condition term-optionunstemmed/term-option
against word or value, I get back non-English documents in the result set
but since I cannot apply this to a range constraint or to a collection,
hence I don't get the non-English documents in the result set. Please
explain how to achieve this.



-- 
Regards
Amit
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] ML 5 giving different result count than ML4.2

2012-08-22 Thread amit gope
Hi All,

Just to add to my query, ML 4.2 is giving results correctly irrespective of
the filter used being filtered or unfiltered. But when i change my
query from unfiltered to filtered it gives me the correct result. Please
suggest.

Regards
Amit

On 22 August 2012 20:20, general-requ...@developer.marklogic.com wrote:

 Send General mailing list submissions to
 general@developer.marklogic.com

 To subscribe or unsubscribe via the World Wide Web, visit
 http://developer.marklogic.com/mailman/listinfo/general
 or, via email, send a message with subject or body 'help' to
 general-requ...@developer.marklogic.com

 You can reach the person managing the list at
 general-ow...@developer.marklogic.com

 When replying, please edit your Subject line so it is more specific
 than Re: Contents of General digest...

 Today's Topics:

1. Number of threads for ML app (Danny Sinang)
2. Option to not hit cache (Danny Sinang)
3. Re: Option to not hit cache (David Lee)
4. ML 5 giving different result count than   ML4.2 (amit gope)
5. Re: Option to not hit cache (Wayne Feick)
6. Re: Option to not hit cache (seme...@hotmail.com)
7. Re: Number of threads for ML app (Michael Blakeley)
8. Re: Option to not hit cache (Michael Blakeley)


 -- Forwarded message --
 From: Danny Sinang d.sin...@gmail.com
 To: general General@developer.marklogic.com
 Cc:
 Date: Wed, 22 Aug 2012 07:33:54 -0400
 Subject: [MarkLogic Dev General] Number of threads for ML app
 Hi,

 Our ML server is hosted by a machine with 16 cores with hypterthreading so
 it looks like it has 32 cores total.

 Our main ML app is configured to use 32 threads with a backlog of 256
 . Should we stick to this setting or can we bump up the number of threads
 to handle more requests simultaneously ?

 My colleague thinks we should match the number of ML threads to the number
 of threads accepted by the application servers call ML services. I,
 however, think we can't and shouldn't go beyond 32 because that's the
 actual number of cores our machine has.

 Would appreciate any advice on this matter.

 Regards,
 Danny


 -- Forwarded message --
 From: Danny Sinang d.sin...@gmail.com
 To: general General@developer.marklogic.com
 Cc:
 Date: Wed, 22 Aug 2012 08:00:15 -0400
 Subject: [MarkLogic Dev General] Option to not hit cache
 Hi,

 Is there an option in xquery, cts:search, or search:search telling ML not
 to fetch results from the cache ?

 We need to test the performance of some queries and we want to see its
 actual speed not coming from the cache.

 Regards,
 Danny



 -- Forwarded message --
 From: David Lee david@marklogic.com
 To: MarkLogic Developer Discussion general@developer.marklogic.com
 Cc:
 Date: Wed, 22 Aug 2012 05:03:01 -0700
 Subject: Re: [MarkLogic Dev General] Option to not hit cache

 Good question.

 Dumb suggestion:  reboot the server between each query  ?

 ** **

 ** **


 -
 

 David Lee
 Lead Engineer
 MarkLogic Corporation
 d...@marklogic.com
 Phone: +1 812-482-5224

 Cell:  +1 812-630-7622
 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
 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:* general-boun...@developer.marklogic.com [mailto:
 general-boun...@developer.marklogic.com] *On Behalf Of *Danny Sinang
 *Sent:* Wednesday, August 22, 2012 8:00 AM
 *To:* general
 *Subject:* [MarkLogic Dev General] Option to not hit cache

 ** **

 Hi,

 ** **

 Is there an option in xquery, cts:search, or search:search telling ML not
 to fetch results from the cache ?

 ** **

 We need to test the performance of some queries and we want to see its
 actual speed not coming from the cache.

 ** **

 Regards,

 Danny

 ** **


 -- Forwarded message --
 From: amit gope amitgo...@gmail.com
 To: general@developer.marklogic.com
 Cc:
 Date: Wed, 22 Aug 2012 17:44:31 +0530
 Subject: [MarkLogic Dev General] ML 5 giving different result count than
 ML4.2
 Hello All,

 I have a search query, and while running the query on Ml5.0 the result
 count is almost the double than what it returns on ML4.2 . Can anyone
 suggest what can be the cause of this behaviour?

 --
 Regards
 Amit




 -- Forwarded message --
 From: Wayne Feick wayne.fe...@marklogic.com
 To: MarkLogic Developer Discussion general@developer.marklogic.com
 Cc: general General@developer.marklogic.com
 Date: Wed, 22 Aug 2012 05:59:51 -0700
 Subject: Re: [MarkLogic Dev General] Option

[MarkLogic Dev General] Query on multiple language using search api

2012-08-16 Thread amit gope
Hello All,

Can anyone please help me out queering on multiple languages using search
api. In my database i have documents of different languages (en, de, fr) to
name a few. Currently when i do not provide any language specification it
returns me contents from only english. How do i mention the language
constraint to include the search for languages de and fr as well?


Regards
Amit
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] wildcarded search not working for value based search

2012-06-21 Thread amit gope
Hi All,

Well i am able to search both word as well as value based constraint or
search, but wildcard search is not getting reflected in case of range
value. Please suggest any work around. I am stuck in no man's land.

On 20 June 2012 20:22, amit gope amitgo...@gmail.com wrote:

 Hi All,

 I am working with the search api and want to implement wild card search.
 Well it gives me results for parameters that has phrase based parameters
 but not for value based searches. Please suggest the workaround.

 Parameters fetching result:: qauthor:ami?/q
 Parameters not fetching result :: qdate:201?/q

 --
 Regards
 Amit





-- 
Regards
Amit
___
General mailing list
General@developer.marklogic.com
http://community.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] wildcarded search not working for value based search

2012-06-20 Thread amit gope
Hi All,

I am working with the search api and want to implement wild card search.
Well it gives me results for parameters that has phrase based parameters
but not for value based searches. Please suggest the workaround.

Parameters fetching result:: qauthor:ami?/q
Parameters not fetching result :: qdate:201?/q

-- 
Regards
Amit
___
General mailing list
General@developer.marklogic.com
http://community.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] issue creating facet in search

2012-06-19 Thread amit gope
Hi All,

When i am adding a new constraint to add a new facet, i am unable to use it
as the element on which constraint is being made does not have a range
defined for it.

This is the part of the xml ::*Book Language=EnBookInfo Language=En
TocLevels=0 NumberingStyle=Unnumbered ContainsESM=No
BookProductType=Proceedings MediaType=Book/BookInfo/Book*

i want to create a facet on BookInfo/@BookProductType, but i am unable to
do it, can anyone tell me how to achieve this?

-- 
Regards
Amit
___
General mailing list
General@developer.marklogic.com
http://community.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] Difficulty in reading child element node

2012-06-08 Thread amit gope
Hello All.

I have a code that looks something like this:

xquery version 1.0-ml;
module namespace amit = http://www.amitgope.com/api/search-options;;
declare function load-common-constraints()
{
options xmlns=http://marklogic.com/appservices/search;
!-- term options --
term
empty apply=no-results /
term-optioncase-insensitive/term-option
/term

!-- search contraints --
constraint name=doi
value
element ns=http://www.google.com/app/meta; name=DOI/
/value
/constraint
/options
}
declare function load-unique-constraint()
{
options xmlns=http://marklogic.com/appservices/search;
{ *amit:load-common-constraints()/options/** }
operator name=sort
state name=relevance
sort-order
score/
/sort-order
/state
state name=date
sort-order direction=descending type=xs:date
collation=
element ns=http://www.amit.com/app/meta; name=Date/
/sort-order
sort-order
score/
/sort-order
/state
/operator
operator name=JournalOnlineFirst
state name=true
/state
/operator
!-- results options --
return-metricsfalse/return-metrics
return-facetstrue/return-facets

searchable-expression/Publisher[.//JournalOnlineFirst]/searchable-expression

!-- results transformation --
transform-results apply=raw/

/options
}

I want the end option to be like this:
options xmlns=http://marklogic.com/appservices/search;
!-- term options --
term
empty apply=no-results /
term-optioncase-insensitive/term-option
/term

!-- search contraints --
constraint name=doi
value
element ns=http://www.google.com/app/meta; name=DOI/
/value
/constraint
operator name=sort
state name=relevance
sort-order
score/
/sort-order
/state
state name=date
sort-order direction=descending type=xs:date
collation=
element ns=http://www.amit.com/app/meta; name=Date/
/sort-order
sort-order
score/
/sort-order
/state
/operator
operator name=JournalOnlineFirst
state name=true
/state
/operator
!-- results options --
return-metricsfalse/return-metrics
return-facetstrue/return-facets

searchable-expression/Publisher[.//JournalOnlineFirst]/searchable-expression

!-- results transformation --
transform-results apply=raw/
/options

What modifications do i need to make to my code so that i end up only havin
one option node and the calling of the first function only gives its child
nodes. This option i will pass on to the search api so that i can fetch the
results based on the different conditions.
-- 
Regards
Amit
___
General mailing list
General@developer.marklogic.com
http://community.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Issue with operator in Search api

2012-06-08 Thread amit gope
Hi All,

I figured it out myself. Thanks anyways.

Regards
Amit

On 7 June 2012 12:22, general-requ...@developer.marklogic.com wrote:

 Send General mailing list submissions to
general@developer.marklogic.com

 To subscribe or unsubscribe via the World Wide Web, visit
http://community.marklogic.com/mailman/listinfo/general
 or, via email, send a message with subject or body 'help' to
general-requ...@developer.marklogic.com

 You can reach the person managing the list at
general-ow...@developer.marklogic.com

 When replying, please edit your Subject line so it is more specific
 than Re: Contents of General digest...

 Today's Topics:

   1. Re: Issue with operator in Search api (amit gope)


 -- Forwarded message --
 From: amit gope amitgo...@gmail.com
 To: general@developer.marklogic.com
 Cc:
 Date: Thu, 7 Jun 2012 12:22:54 +0530
 Subject: Re: [MarkLogic Dev General] Issue with operator in Search api
 Hi Micah,

 In addition to the operator question, can the operators be made
 case-insensitive? for eg if i provide JOURNALONLINEFIRST or
 JournalONLINEFirst still it should fetch the results.

 Regards
 Amit

 On 7 June 2012 10:49, amit gope amitgo...@gmail.com wrote:

 Hi Micah,

 Thank you so much for your help. It worked.

 Regards
 Amit

 On 7 June 2012 10:12, general-requ...@developer.marklogic.com wrote:

 Send General mailing list submissions to
general@developer.marklogic.com

 To subscribe or unsubscribe via the World Wide Web, visit
http://community.marklogic.com/mailman/listinfo/general
 or, via email, send a message with subject or body 'help' to
general-requ...@developer.marklogic.com

 You can reach the person managing the list at
general-ow...@developer.marklogic.com

 When replying, please edit your Subject line so it is more specific
 than Re: Contents of General digest...

 Today's Topics:

   1. xdmp:base64Decode returns invalid UTF-8   escape sequence
  (Steve Spigarelli)
   2. Re: xdmp:base64Decode returns invalid UTF-8   escape sequence
  (Michael Blakeley)
   3. Re: xdmp:base64Decode returns invalid UTF-8   escape sequence
  (Steve Spigarelli)
   4. Re: xdmp:base64Decode returns invalid UTF-8   escape sequence
  (Michael Blakeley)
   5. Issue with operator in Search api (amit gope)
   6. Re: Issue with operator in Search api (Micah Dubinko)


 -- Forwarded message --
 From: Steve Spigarelli s...@spig.net
 To: general@developer.marklogic.com
 Cc:
 Date: Wed, 6 Jun 2012 14:25:12 -0600
 Subject: [MarkLogic Dev General] xdmp:base64Decode returns invalid UTF-8
 escape sequence
 How do I tell this code that I don't want it to be UTF-8 encoded?

 xquery version 1.0-ml;

 xdmp:base64-decode('JxrHeSl2YX4LunZkWKZqog==')

 Thanks
 Steve



 -- Forwarded message --
 From: Michael Blakeley m...@blakeley.com
 To: MarkLogic Developer Discussion general@developer.marklogic.com
 Cc:
 Date: Wed, 6 Jun 2012 13:37:34 -0700
 Subject: Re: [MarkLogic Dev General] xdmp:base64Decode returns invalid
 UTF-8 escape sequence
 That function only works with encoded strings, and I think they have to
 be UTF-8 as well. But try this trick:

binary { xs:hexBinary(xs:base64Binary('JxrHeSl2YX4LunZkWKZqog=='))

 -- Mike

 On 6 Jun 2012, at 13:25 , Steve Spigarelli wrote:

  How do I tell this code that I don't want it to be UTF-8 encoded?
 
  xquery version 1.0-ml;
 
  xdmp:base64-decode('JxrHeSl2YX4LunZkWKZqog==')





 -- Forwarded message --
 From: Steve Spigarelli s...@spig.net
 To: general@developer.marklogic.com
 Cc:
 Date: Wed, 6 Jun 2012 14:53:48 -0600
 Subject: Re: [MarkLogic Dev General] xdmp:base64Decode returns invalid
 UTF-8 escape sequence
 So the initial string JxrHeSl2YX4LunZkWKZqog== is a base64 encoded
 nonce from soapUI. It only contains characters that are valid in a
 base64 world, so Marklogic has no problems with it. It's what happens
 next when one runs the decode that causes the problems.

 In order to calculate a SOAP password digest one needs the original
 nonce (base64 decoded of the base64 encoded nonce), the timestamp and
 the password. But, in order to base64 decode a nonce with invalid
 UTF-8 sequences one must use functions that are not available in
 Marklogic. Casting the original base64 encoded string (that is already
 valid) to base64 binary then to hexbinary then to a binary document
 doesn't get me what I need for calling the base64-decode function that
 expects an xs:string.

 I think that my colleague will just end up doing simple passwords over
 https instead of password digest unless there is another way to do
 this.

 Steve


 That function only works with encoded strings, and I think they have
 to be UTF-8 as well. But try this trick:

binary { xs:hexBinary(xs:base64Binary('JxrHeSl2YX4LunZkWKZqog=='))

 -- Mike


 On Wed, Jun 6, 2012 at 2:25 PM, Steve Spigarelli s...@spig.net wrote:
  How do I tell this code that I

Re: [MarkLogic Dev General] Issue with operator in Search api

2012-06-07 Thread amit gope
Hi Micah,

In addition to the operator question, can the operators be made
case-insensitive? for eg if i provide JOURNALONLINEFIRST or
JournalONLINEFirst still it should fetch the results.

Regards
Amit

On 7 June 2012 10:49, amit gope amitgo...@gmail.com wrote:

 Hi Micah,

 Thank you so much for your help. It worked.

 Regards
 Amit

 On 7 June 2012 10:12, general-requ...@developer.marklogic.com wrote:

 Send General mailing list submissions to
general@developer.marklogic.com

 To subscribe or unsubscribe via the World Wide Web, visit
http://community.marklogic.com/mailman/listinfo/general
 or, via email, send a message with subject or body 'help' to
general-requ...@developer.marklogic.com

 You can reach the person managing the list at
general-ow...@developer.marklogic.com

 When replying, please edit your Subject line so it is more specific
 than Re: Contents of General digest...

 Today's Topics:

   1. xdmp:base64Decode returns invalid UTF-8   escape sequence
  (Steve Spigarelli)
   2. Re: xdmp:base64Decode returns invalid UTF-8   escape sequence
  (Michael Blakeley)
   3. Re: xdmp:base64Decode returns invalid UTF-8   escape sequence
  (Steve Spigarelli)
   4. Re: xdmp:base64Decode returns invalid UTF-8   escape sequence
  (Michael Blakeley)
   5. Issue with operator in Search api (amit gope)
   6. Re: Issue with operator in Search api (Micah Dubinko)


 -- Forwarded message --
 From: Steve Spigarelli s...@spig.net
 To: general@developer.marklogic.com
 Cc:
 Date: Wed, 6 Jun 2012 14:25:12 -0600
 Subject: [MarkLogic Dev General] xdmp:base64Decode returns invalid UTF-8
 escape sequence
 How do I tell this code that I don't want it to be UTF-8 encoded?

 xquery version 1.0-ml;

 xdmp:base64-decode('JxrHeSl2YX4LunZkWKZqog==')

 Thanks
 Steve



 -- Forwarded message --
 From: Michael Blakeley m...@blakeley.com
 To: MarkLogic Developer Discussion general@developer.marklogic.com
 Cc:
 Date: Wed, 6 Jun 2012 13:37:34 -0700
 Subject: Re: [MarkLogic Dev General] xdmp:base64Decode returns invalid
 UTF-8 escape sequence
 That function only works with encoded strings, and I think they have to
 be UTF-8 as well. But try this trick:

binary { xs:hexBinary(xs:base64Binary('JxrHeSl2YX4LunZkWKZqog=='))

 -- Mike

 On 6 Jun 2012, at 13:25 , Steve Spigarelli wrote:

  How do I tell this code that I don't want it to be UTF-8 encoded?
 
  xquery version 1.0-ml;
 
  xdmp:base64-decode('JxrHeSl2YX4LunZkWKZqog==')





 -- Forwarded message --
 From: Steve Spigarelli s...@spig.net
 To: general@developer.marklogic.com
 Cc:
 Date: Wed, 6 Jun 2012 14:53:48 -0600
 Subject: Re: [MarkLogic Dev General] xdmp:base64Decode returns invalid
 UTF-8 escape sequence
 So the initial string JxrHeSl2YX4LunZkWKZqog== is a base64 encoded
 nonce from soapUI. It only contains characters that are valid in a
 base64 world, so Marklogic has no problems with it. It's what happens
 next when one runs the decode that causes the problems.

 In order to calculate a SOAP password digest one needs the original
 nonce (base64 decoded of the base64 encoded nonce), the timestamp and
 the password. But, in order to base64 decode a nonce with invalid
 UTF-8 sequences one must use functions that are not available in
 Marklogic. Casting the original base64 encoded string (that is already
 valid) to base64 binary then to hexbinary then to a binary document
 doesn't get me what I need for calling the base64-decode function that
 expects an xs:string.

 I think that my colleague will just end up doing simple passwords over
 https instead of password digest unless there is another way to do
 this.

 Steve


 That function only works with encoded strings, and I think they have
 to be UTF-8 as well. But try this trick:

binary { xs:hexBinary(xs:base64Binary('JxrHeSl2YX4LunZkWKZqog=='))

 -- Mike


 On Wed, Jun 6, 2012 at 2:25 PM, Steve Spigarelli s...@spig.net wrote:
  How do I tell this code that I don't want it to be UTF-8 encoded?
 
  xquery version 1.0-ml;
 
  xdmp:base64-decode('JxrHeSl2YX4LunZkWKZqog==')
 
  Thanks
  Steve



 -- Forwarded message --
 From: Michael Blakeley m...@blakeley.com
 To: MarkLogic Developer Discussion general@developer.marklogic.com
 Cc:
 Date: Wed, 6 Jun 2012 14:11:33 -0700
 Subject: Re: [MarkLogic Dev General] xdmp:base64Decode returns invalid
 UTF-8 escape sequence
 HTTPS sounds reasonable, but you can do a few more tricks with binary
 data. This might get you there:

xdmp:hex-to-integer(
  string(xs:hexBinary(xs:base64Binary('JxrHeSl2YX4LunZkWKZqog=='

 The result is an xs:decimal 18446744073709551615 - is that what you need?
 You might want to construct an xs:unsignedLong from it, and use
 xdmp:not64() and its siblings for the math.

 -- Mike

 On 6 Jun 2012, at 13:53 , Steve Spigarelli wrote:

  So the initial string JxrHeSl2YX4LunZkWKZqog== is a base64 encoded
  nonce from soapUI. It only

[MarkLogic Dev General] Issue with operator in Search api

2012-06-06 Thread amit gope
Hello All,

I am new to search api and i am having trouble in implementing one
functionality. There are basically two things that i am stuck with:

   1. Can i have two operators in the options?
   2. I have a code which looks something like this:

   operator name=sort
state name=relevance
sort-order
score/
/sort-order
/state
state name=date
sort-order direction=descending
type=xs:date collation=
element ns=
http://www.marklogic.com/app/meta; name=Date/
/sort-order
sort-order
score/
/sort-order
/state
/operator
operator name=JournalOnlineFirst
state name=true

searchable-expression/Publisher[.//JournalOnlineFirst]/searchable-expression
/state
/operator

If my URL has an reads something like this
localhost:1234:///q=issn:1573-4803
journalonlinefirst:trueapi_key=asdbfdas2342sfda i want the api to fetch
me those docs which are of the type JournalOnlineFirst. But i get the error
as :

XDMP-ARGTYPE: (err:XPTY0004)
fn:in-scope-prefixes((searchable-expression
xmlns=http://marklogic.com/appservices/search;/Publisher[.//JournalOnlineFirst]/searchable-expression,
searchable-expression
xmlns=http://marklogic.com/appservices/search;fn:collection()/searchable-expression))
-- arg1 is not of type element()

Please suggest how to achieve the result because i am stuck at this place.
I have also tried something like this.

operator name=JournalOnlineFirst
state name=true
/state
/operator

searchable-expression/Publisher[.//JournalOnlineFirst]/searchable-expression.


Here i dont get the result, but i dont get the error as well. Please let me
know where i am going wrong. Thanks in advance.
Regards
Amit
___
General mailing list
General@developer.marklogic.com
http://community.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Issue with operator in Search api

2012-06-06 Thread amit gope
Hi Micah,

Thank you so much for your help. It worked.

Regards
Amit

On 7 June 2012 10:12, general-requ...@developer.marklogic.com wrote:

 Send General mailing list submissions to
general@developer.marklogic.com

 To subscribe or unsubscribe via the World Wide Web, visit
http://community.marklogic.com/mailman/listinfo/general
 or, via email, send a message with subject or body 'help' to
general-requ...@developer.marklogic.com

 You can reach the person managing the list at
general-ow...@developer.marklogic.com

 When replying, please edit your Subject line so it is more specific
 than Re: Contents of General digest...

 Today's Topics:

   1. xdmp:base64Decode returns invalid UTF-8   escape sequence
  (Steve Spigarelli)
   2. Re: xdmp:base64Decode returns invalid UTF-8   escape sequence
  (Michael Blakeley)
   3. Re: xdmp:base64Decode returns invalid UTF-8   escape sequence
  (Steve Spigarelli)
   4. Re: xdmp:base64Decode returns invalid UTF-8   escape sequence
  (Michael Blakeley)
   5. Issue with operator in Search api (amit gope)
   6. Re: Issue with operator in Search api (Micah Dubinko)


 -- Forwarded message --
 From: Steve Spigarelli s...@spig.net
 To: general@developer.marklogic.com
 Cc:
 Date: Wed, 6 Jun 2012 14:25:12 -0600
 Subject: [MarkLogic Dev General] xdmp:base64Decode returns invalid UTF-8
 escape sequence
 How do I tell this code that I don't want it to be UTF-8 encoded?

 xquery version 1.0-ml;

 xdmp:base64-decode('JxrHeSl2YX4LunZkWKZqog==')

 Thanks
 Steve



 -- Forwarded message --
 From: Michael Blakeley m...@blakeley.com
 To: MarkLogic Developer Discussion general@developer.marklogic.com
 Cc:
 Date: Wed, 6 Jun 2012 13:37:34 -0700
 Subject: Re: [MarkLogic Dev General] xdmp:base64Decode returns invalid
 UTF-8 escape sequence
 That function only works with encoded strings, and I think they have to be
 UTF-8 as well. But try this trick:

binary { xs:hexBinary(xs:base64Binary('JxrHeSl2YX4LunZkWKZqog=='))

 -- Mike

 On 6 Jun 2012, at 13:25 , Steve Spigarelli wrote:

  How do I tell this code that I don't want it to be UTF-8 encoded?
 
  xquery version 1.0-ml;
 
  xdmp:base64-decode('JxrHeSl2YX4LunZkWKZqog==')





 -- Forwarded message --
 From: Steve Spigarelli s...@spig.net
 To: general@developer.marklogic.com
 Cc:
 Date: Wed, 6 Jun 2012 14:53:48 -0600
 Subject: Re: [MarkLogic Dev General] xdmp:base64Decode returns invalid
 UTF-8 escape sequence
 So the initial string JxrHeSl2YX4LunZkWKZqog== is a base64 encoded
 nonce from soapUI. It only contains characters that are valid in a
 base64 world, so Marklogic has no problems with it. It's what happens
 next when one runs the decode that causes the problems.

 In order to calculate a SOAP password digest one needs the original
 nonce (base64 decoded of the base64 encoded nonce), the timestamp and
 the password. But, in order to base64 decode a nonce with invalid
 UTF-8 sequences one must use functions that are not available in
 Marklogic. Casting the original base64 encoded string (that is already
 valid) to base64 binary then to hexbinary then to a binary document
 doesn't get me what I need for calling the base64-decode function that
 expects an xs:string.

 I think that my colleague will just end up doing simple passwords over
 https instead of password digest unless there is another way to do
 this.

 Steve


 That function only works with encoded strings, and I think they have
 to be UTF-8 as well. But try this trick:

binary { xs:hexBinary(xs:base64Binary('JxrHeSl2YX4LunZkWKZqog=='))

 -- Mike


 On Wed, Jun 6, 2012 at 2:25 PM, Steve Spigarelli s...@spig.net wrote:
  How do I tell this code that I don't want it to be UTF-8 encoded?
 
  xquery version 1.0-ml;
 
  xdmp:base64-decode('JxrHeSl2YX4LunZkWKZqog==')
 
  Thanks
  Steve



 -- Forwarded message --
 From: Michael Blakeley m...@blakeley.com
 To: MarkLogic Developer Discussion general@developer.marklogic.com
 Cc:
 Date: Wed, 6 Jun 2012 14:11:33 -0700
 Subject: Re: [MarkLogic Dev General] xdmp:base64Decode returns invalid
 UTF-8 escape sequence
 HTTPS sounds reasonable, but you can do a few more tricks with binary
 data. This might get you there:

xdmp:hex-to-integer(
  string(xs:hexBinary(xs:base64Binary('JxrHeSl2YX4LunZkWKZqog=='

 The result is an xs:decimal 18446744073709551615 - is that what you need?
 You might want to construct an xs:unsignedLong from it, and use
 xdmp:not64() and its siblings for the math.

 -- Mike

 On 6 Jun 2012, at 13:53 , Steve Spigarelli wrote:

  So the initial string JxrHeSl2YX4LunZkWKZqog== is a base64 encoded
  nonce from soapUI. It only contains characters that are valid in a
  base64 world, so Marklogic has no problems with it. It's what happens
  next when one runs the decode that causes the problems.
 
  In order to calculate a SOAP password digest one needs the original
  nonce (base64 decoded

[MarkLogic Dev General] XDMO-FORESTMNT error

2012-04-09 Thread amit gope
Hello All,

Whenever I try to connect to my MarkLogic Server I am getting the following
error XDMP-FORESTMNT: Forest Security-gfs not mounted: disconnected. Can
anyone please explain me what is this error about and what should i do to
rectify the issue?

-- 
Regards
Amit
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] Issue with Mark Logic Query

2011-12-01 Thread amit gope
Hi All,

I have a database where the element range index is on the element date, and
now i am executing a query where i have used element value query on one of
the elements, but the results fetched are not adhering to the query, please
suggest the changes that i need to make.

let $uri :=(cts:uris('', ('document','limit=100'),
(cts:and-query((cts:directory-query('/content/', 'infinity'),
cts:element-query((xs:QName('meta:DateLoaded')),'2011*'),
cts:element-query((xs:QName('meta:PubName')),'Springer'),
cts:element-query(xs:QName('Affiliation'), cts:and-query((),
())),

cts:element-query(xs:QName('meta:Institution'),cts:and-query((),())),
cts:not-query(cts:element-query(xs:QName(meta:GeoOrg),
cts:and-query((), (
  ), ())), (), ()))[1 to 100]
return (count($uri),$uri)


In the above query it is fetching me uri's of those articles where the meta
dateloaded is 2010. Please suggest

-- 
Regards
Amit
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general