Re: [MarkLogic Dev General] Date query "nearest" a given date.

2011-09-08 Thread Lee, David
Jason had the question right. Given a point in time from some other source I want to find the nearest record to that point. Actually finding both ends of the fence would be useful. Its highly unlikely that there exists a record that *exactly* matches the timestamp (its to 3 digits of ms.) --

Re: [MarkLogic Dev General] Read only access to Admin interface.....

2011-09-08 Thread Charles Greer
What Micah said. You'll have exactly what you want, RESTfully or interactively, as soon as 5.0 hits the streets. ___ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general

Re: [MarkLogic Dev General] Date query "nearest" a given date.

2011-09-08 Thread Mike Sokolov
Oh I see. I thought he was starting from some log posting and wanted to find the nearest other one... I think I misread his original post :) On 09/08/2011 03:36 PM, Jason Hunter wrote: Yes, but my assumption was that David would be happy with a T0 hit. I assumed his question was akin to, "Fin

Re: [MarkLogic Dev General] Date query "nearest" a given date.

2011-09-08 Thread Jason Hunter
Yes, but my assumption was that David would be happy with a T0 hit. I assumed his question was akin to, "Find me someone near 6' tall" and so someone exactly 6' would be great. If it's "Find me someone near 6' tall who isn't exactly 6' tall" then you're going to need the extra fenceposts like

Re: [MarkLogic Dev General] Read only access to Admin interface.....

2011-09-08 Thread Micah Dubinko
Abhishek, I don't know what your timeline looks like, but if you can hold out for MarkLogic 5.0, a RO admin interface comes out of the box. -m On Sep 8, 2011, at 4:57 AM, Abhishek53 S wrote: Hi Folks I am trying to have read only access to admin console (8001) of ML server...User with this

Re: [MarkLogic Dev General] Schema overhead

2011-09-08 Thread Michael Blakeley
Take a look at http://developer.marklogic.com/learn/2007-04-schema if you haven't already read it. Documents don't need to validate, but nodes must match their declared types. Loading the schema has a document-fetch cost the first time, but then it should stay in the schema cache for a long tim

Re: [MarkLogic Dev General] Date query "nearest" a given date.

2011-09-08 Thread Mike Sokolov
Results from cts:element-attribute-values() include the value you pass in, I think. So if you want to find the nearest value to value T0, I think you'd need two sequences of two values: [ T0, T+] [ T0, T-] On 09/08/2011 01:47 PM, Jason Hunter wrote: Hmm, I don't see that, but of course that

[MarkLogic Dev General] Schema overhead

2011-09-08 Thread Lee, David
If I load a schema for documents then I presume I can start doing things like If( $f/@start_dt lt $f/@end_date ) without having to do If( xs:dateTime($f/@start_dt) lt ($f/@end_date ) ) That would be really nice. Couple questions. Do I have to "validate" the documents in ord

Re: [MarkLogic Dev General] Modifying an existing option in Application Builder

2011-09-08 Thread Shannon
Colleen, works perfectly! That's how we override specific options in 4.2. Big help. Thanks. On Sep 7, 2011, at 12:55 PM, Colleen Whitney wrote: > Try this in your appfunctions.xqy file: > > declare variable $OPTIONS := >http://marklogic.com/appservices/search";> >20 >{for $

Re: [MarkLogic Dev General] Date query "nearest" a given date.

2011-09-08 Thread Jason Hunter
Hmm, I don't see that, but of course that's typical with fencepost problems. :) Sent from my iPhone On Sep 8, 2011, at 9:44 AM, Mike Sokolov wrote: > Is there a fencepost problem there? I think you might have to fetch two > values in each direction... > > On 09/08/2011 04:35 AM, Jason Hunter

Re: [MarkLogic Dev General] Date query "nearest" a given date.

2011-09-08 Thread Mike Sokolov
Is there a fencepost problem there? I think you might have to fetch two values in each direction... On 09/08/2011 04:35 AM, Jason Hunter wrote: I'd suggest doing two cts:element-attribute-values() calls, both starting at the target date, one ascending and one descending. Fetch just one value

Re: [MarkLogic Dev General] Read only access to Admin interface.....

2011-09-08 Thread Abhishek53 S
I really appreciate your suggestions...I am ready to go ahead with this information to develop some custom admin Interface to provide such functionality... Thanks again Abhishek Srivastav Tata Consultancy Services Cell:- +91-9883389968 Mailto: abhishek5...@tcs.com Website: http://www.tcs.com ___

Re: [MarkLogic Dev General] Read only access to Admin interface.....

2011-09-08 Thread Geert Josten
Just be careful with how you use this. Not something to make publicly available. And it could easily break on next MarkLogic Server update.. Kind regards, Geert Van: Geert Josten Verzonden: donderdag 8 september 2011 16:43 Aan: General MarkLogic Developer Discussion Onderwerp: RE: [MarkLogic Dev

Re: [MarkLogic Dev General] Read only access to Admin interface.....

2011-09-08 Thread Geert Josten
Hi Abhishek, Yes, that is possible. You will have to do that yourself though. You might be interested in the following though. The basics seem to work at least. You might need to do a thorough check though whether it sufficiently blocks updates, it now only looks at the request method.. Insert

Re: [MarkLogic Dev General] Read only access to Admin interface.....

2011-09-08 Thread Abhishek53 S
Geert , Thanks for your fast replyI would like to create custom admin interface that will provide subset of Admin monitoring functionality Abhishek Srivastav Tata Consultancy Services Cell:- +91-9883389968 Mailto: abhishek5...@tcs.com Website: http://www.tcs.com _

Re: [MarkLogic Dev General] Read only access to Admin interface.....

2011-09-08 Thread Geert Josten
Hi Abhishek, Most pages in the Admin interface are shielded with the sec:check-admin function, which only tolerates current users that have admin role. And users with admin role have always unlimited access to anything. If you only need a small part of the Admin interface functionality, you are

[MarkLogic Dev General] Read only access to Admin interface.....

2011-09-08 Thread Abhishek53 S
Hi Folks I am trying to have read only access to admin console (8001) of ML server...User with this role can logged in to Admin interface to monitor the activity but can not modify any other configurations... The following execute privileges are provided to the custom read-only-admin role ad

Re: [MarkLogic Dev General] Date query "nearest" a given date.

2011-09-08 Thread Jason Hunter
I'd suggest doing two cts:element-attribute-values() calls, both starting at the target date, one ascending and one descending. Fetch just one value in each direction. Decide which is closest. Then retrieve the document using a cts:element-range-query with the "=" comparator to that closest v

[MarkLogic Dev General] Date query "nearest" a given date.

2011-09-08 Thread Lee, David
Suppose I have docs with a date attribute like And I want to retrieve the document(s) which are 'nearest' a given date in time. I suppose the same logic would apply with integer or floating numbers. Suppose I have an attribute range index on the date value Is there a cts:query that can do this d