See if this answers your questions: http://docs.marklogic.com/guide/java/searches#chapter With the Java API (unlike the REST API) you dont generally need to know what the script is that is being called. That is all handled for you. Instead you use Java objects to describe and execute your search.
----------------------------------------------------------------------------- David Lee Lead Engineer MarkLogic Corporation [email protected] Phone: +1 812-482-5224 Cell: +1 812-630-7622 www.marklogic.com<http://www.marklogic.com/> From: [email protected] [mailto:[email protected]] On Behalf Of Shibu N Sent: Wednesday, January 23, 2013 5:22 AM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Help - Will Marklogic support calling query with parameters Thanks Justin for that Info, I did do some reading into the java API's. I have seen examples searching for documents, but in this case I'm trying to invoke the search.xq file using the API. Just wanted to know if this is possible. The search.xq file is like a stored procedure which would give me the required results by accepting the parameters for searchtext. Thanks & Regards Shibu --- On Wed, 1/23/13, Justin Makeig <[email protected]> wrote: From: Justin Makeig <[email protected]> Subject: Re: [MarkLogic Dev General] Help - Will Marklogic support calling query with parameters To: "MarkLogic Developer Discussion" <[email protected]> Date: Wednesday, January 23, 2013, 12:48 AM Shibu, I’d start with the Java API that comes as part of MarkLogic 6. Among other things, it allows you to manage documents and perform searches. You can find the “Java Developer’s Guide” at <http://docs.marklogic.com/guide/java>. You can also download the JARs (or access the Maven repository) from <http://developer.marklogic.com/products/java>. The download page has links to other helpful getting started guides. If the built-in Java or REST APIs don’t do what you need, you can also build your own HTTP services, as it appears you’ve started below. However, for common tasks, such as search, you’ll be duplicating the functionality of REST and Java APIs that we’ve included in MarkLogic 6. Justin Justin Makeig Director, Product Management MarkLogic Corporation [email protected]</mc/[email protected]> www.marklogic.com<http://www.marklogic.com/> On Jan 23, 2013, at 12:31 AM, Shibu N <[email protected]</mc/[email protected]>> wrote: Hi Friends, I'm relatively new to marklogic and I have a requirement where I'll have to call a query on the server with parameters using the java API. I'm not sure of the best approach to do this either. whether to use java API/ REST API's. The query is of the form http://localhost:8010/search.xq?text=searchtext The query search.xq simply performs a search based on searchtext and returns the results, Any tips would be helpful, Thanks & Regards Shibu _______________________________________________ General mailing list [email protected]</mc/[email protected]> http://developer.marklogic.com/mailman/listinfo/general -----Inline Attachment Follows----- _______________________________________________ General mailing list [email protected]</mc/[email protected]> http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
