Re: [MarkLogic Dev General] Help - Will Marklogic support calling query with parameters

2013-01-24 Thread David Lee
Another alternative is using the XCC library which is lower level then REST.
It allows you to invoke stored XQuery modules as well as executing any ad-hoc 
XQuery
http://developer.marklogic.com/products/xcc

If you want examples you can look at how xmlsh uses XCC to talk to marklogic
See the MarkLogic extension to xmlsh (written in java )
http://www.xmlsh.org/ModuleMarkLogic

Source code is here:
http://xmlsh.svn.sourceforge.net/viewvc/xmlsh/extensions/marklogic/



-
David Lee
Lead Engineer
MarkLogic Corporation
d...@marklogic.com
Phone: +1 812-482-5224
Cell:  +1 812-630-7622
www.marklogic.com<http://www.marklogic.com/>


From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Erik Hennum
Sent: Thursday, January 24, 2013 10:23 AM
To: Shibu N; MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Help - Will Marklogic support calling 
query with parameters

Hi, Shibu:

Thanks for clarifying.  Yes, the Java API is a client interface specifically 
for the REST API and not a general-purpose interface for any MarkLogic 
application server.

You can either adapt your existing REST services to be a resource extension on 
the REST API or create your own Java client interface for your existing REST 
services, using an HTTP library such as Apache HttpClient.

Erik Hennum

From: general-boun...@developer.marklogic.com 
[general-boun...@developer.marklogic.com] on behalf of Shibu N 
[n.sh...@yahoo.com]
Sent: Wednesday, January 23, 2013 10:22 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Help - Will Marklogic support calling 
query with parameters
Hi,

I think I have not been able to convey my requirement clearly. I have read 
through the API's and have understood that marklogic allows you to search 
documents based on properties. In my case I already have a query search.xq 
installed on the server. I have to invoke 
http://localhost:8010/search.xq?text=search text. My question is how do I 
specify the search query search.xq with parameter key text and value search 
text.

In simple terms what will be the java code for invoking 
http://localhost:8010/search.xq?text=search text. The server is NOT enabled for 
rest API's. Is that the reason?

I'm sorry if you have given me directions and I haven't understood.

Regards

Shibu



From: Erik Hennum 
To: MarkLogic Developer Discussion 
Sent: Wednesday, January 23, 2013 9:58 PM
Subject: Re: [MarkLogic Dev General] Help - Will Marklogic support calling 
query with parameters

Hi, Shibu:

If the built-in search capabilities of the REST API aren't sufficient, you
can extend the REST API write new resource services in XQuery.  Please
see:

http://docs.marklogic.com/guide/rest-dev/extensions

Erik Hennum

From: general-boun...@developer.marklogic.com 
[general-boun...@developer.marklogic.com] on behalf of Shibu N 
[n.sh...@yahoo.com]
Sent: Wednesday, January 23, 2013 2:21 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  wrote:

From: Justin Makeig 
Subject: Re: [MarkLogic Dev General] Help - Will Marklogic support calling 
query with parameters
To: "MarkLogic Developer Discussion" 
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
justin.mak...@marklogic.com
www.marklogic.com<http://www.marklogic.com/>




On Jan 23, 2013, at 12:31 AM, Shibu N >
 wrote:


Hi Friends,

I'm relatively new to marklogic and I have a requirement where I

Re: [MarkLogic Dev General] Help - Will Marklogic support calling query with parameters

2013-01-24 Thread Erik Hennum
Hi, Shibu:

Thanks for clarifying.  Yes, the Java API is a client interface specifically 
for the REST API and not a general-purpose interface for any MarkLogic 
application server.

You can either adapt your existing REST services to be a resource extension on 
the REST API or create your own Java client interface for your existing REST 
services, using an HTTP library such as Apache HttpClient.


Erik Hennum


From: general-boun...@developer.marklogic.com 
[general-boun...@developer.marklogic.com] on behalf of Shibu N 
[n.sh...@yahoo.com]
Sent: Wednesday, January 23, 2013 10:22 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Help - Will Marklogic support calling 
query with parameters

Hi,

I think I have not been able to convey my requirement clearly. I have read 
through the API's and have understood that marklogic allows you to search 
documents based on properties. In my case I already have a query search.xq 
installed on the server. I have to invoke 
http://localhost:8010/search.xq?text=search text. My question is how do I 
specify the search query search.xq with parameter key text and value search 
text.

In simple terms what will be the java code for invoking 
http://localhost:8010/search.xq?text=search text. The server is NOT enabled for 
rest API's. Is that the reason?

I'm sorry if you have given me directions and I haven't understood.

Regards

Shibu



From: Erik Hennum 
To: MarkLogic Developer Discussion 
Sent: Wednesday, January 23, 2013 9:58 PM
Subject: Re: [MarkLogic Dev General] Help - Will Marklogic support calling 
query with parameters

Hi, Shibu:

If the built-in search capabilities of the REST API aren't sufficient, you
can extend the REST API write new resource services in XQuery.  Please
see:

http://docs.marklogic.com/guide/rest-dev/extensions


Erik Hennum


From: general-boun...@developer.marklogic.com 
[general-boun...@developer.marklogic.com] on behalf of Shibu N 
[n.sh...@yahoo.com]
Sent: Wednesday, January 23, 2013 2:21 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  wrote:

From: Justin Makeig 
Subject: Re: [MarkLogic Dev General] Help - Will Marklogic support calling 
query with parameters
To: "MarkLogic Developer Discussion" 
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
justin.mak...@marklogic.com
www.marklogic.com<http://www.marklogic.com/>



On Jan 23, 2013, at 12:31 AM, Shibu N >
 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
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


-Inline Attachment Follows-

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


___
General mailing list
General@developer.marklogic.com<mailto:General@developer.marklogic.com>
http://developer.marklogic.com/mailman/listinfo/general


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


Re: [MarkLogic Dev General] Help - Will Marklogic support calling query with parameters

2013-01-23 Thread Justin Makeig
(: search.xq :)
cts:search(collection(), cts:word-query(xdmp:get-request-field("text")))

You’ll need to save the above as file in the modules root of an HTTP app server 
on port 8010 <http://docs.marklogic.com/guide/admin/http>. Then you can use 
your URL below to make a request from any HTTP client.
The above is a simplified illustration of search, a word query constructor, and 
HTTP request handling. You'd probably want to do some query parsing and 
pagination in a typical search app. (Another plug: The Search API, REST API, 
and Java API do all of this for you.)

Justin



Justin Makeig
Director, Product Management
MarkLogic Corporation
justin.mak...@marklogic.com
www.marklogic.com



On Jan 23, 2013, at 10:22 PM, Shibu N 
 wrote:

> Hi,
> 
> I think I have not been able to convey my requirement clearly. I have read 
> through the API's and have understood that marklogic allows you to search 
> documents based on properties. In my case I already have a query search.xq 
> installed on the server. I have to invoke 
> http://localhost:8010/search.xq?text=search text. My question is how do I 
> specify the search query search.xq with parameter key text and value search 
> text. 
> 
> In simple terms what will be the java code for invoking 
> http://localhost:8010/search.xq?text=search text. The server is NOT enabled 
> for rest API's. Is that the reason?
> 
> I'm sorry if you have given me directions and I haven't understood.
> 
> Regards
> 
> Shibu
> 
> 
> From: Erik Hennum 
> To: MarkLogic Developer Discussion  
> Sent: Wednesday, January 23, 2013 9:58 PM
> Subject: Re: [MarkLogic Dev General] Help - Will Marklogic support calling 
> query with parameters
> 
> Hi, Shibu:
> 
> If the built-in search capabilities of the REST API aren't sufficient, you
> can extend the REST API write new resource services in XQuery.  Please
> see:
> 
> http://docs.marklogic.com/guide/rest-dev/extensions
> 
> 
> Erik Hennum
> 
> From: general-boun...@developer.marklogic.com 
> [general-boun...@developer.marklogic.com] on behalf of Shibu N 
> [n.sh...@yahoo.com]
> Sent: Wednesday, January 23, 2013 2:21 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  wrote:
> 
> From: Justin Makeig 
> Subject: Re: [MarkLogic Dev General] Help - Will Marklogic support calling 
> query with parameters
> To: "MarkLogic Developer Discussion" 
> 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
> justin.mak...@marklogic.com
> www.marklogic.com
> 
> 
> 
> On Jan 23, 2013, at 12:31 AM, Shibu N 
>  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
>> General@developer.marklogic.com
>> ht

Re: [MarkLogic Dev General] Help - Will Marklogic support calling query with parameters

2013-01-23 Thread Shibu N
Hi,

I think I have not been able to convey my requirement clearly. I have read 
through the API's and have understood that marklogic allows you to search 
documents based on properties. In my case I already have a query search.xq 
installed on the server. I have to invoke 
http://localhost:8010/search.xq?text=search text. My question is how do I 
specify the search query search.xq with parameter key text and value search 
text. 

In simple terms what will be the java code for invoking 
http://localhost:8010/search.xq?text=search text. The server is NOT enabled for 
rest API's. Is that the reason?

I'm sorry if you have given me directions and I haven't understood.

Regards

Shibu





 From: Erik Hennum 
To: MarkLogic Developer Discussion  
Sent: Wednesday, January 23, 2013 9:58 PM
Subject: Re: [MarkLogic Dev General] Help - Will Marklogic support calling 
query with parameters
 

 
Hi, Shibu:

If the built-in search capabilities of the REST API aren't sufficient, you
can extend the REST API write new resource services in XQuery.  Please
see:

http://docs.marklogic.com/guide/rest-dev/extensions




Erik Hennum




 
From: general-boun...@developer.marklogic.com 
[general-boun...@developer.marklogic.com] on behalf of Shibu N 
[n.sh...@yahoo.com]
Sent: Wednesday, January 23, 2013 2:21 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  wrote:


>From: Justin Makeig 
>Subject: Re: [MarkLogic Dev General] Help - Will Marklogic support calling 
>query with parameters
>To: "MarkLogic Developer Discussion" 
>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
>justin.mak...@marklogic.com
>www.marklogic.com
>
>
>
>
>On Jan 23, 2013, at 12:31 AM, Shibu N 
> 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
>>General@developer.marklogic.com
>>http://developer.marklogic.com/mailman/listinfo/general
>>
>
>-Inline Attachment Follows-
>
>
>___
>General mailing list
>General@developer.marklogic.com
>http://developer.marklogic.com/mailman/listinfo/general
> 
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Help - Will Marklogic support calling query with parameters

2013-01-23 Thread Charles Greer

Hi Shibu,

We've all (correctly I think) been selling you on the Java and REST 
APIs, but the question you've asked has a simple answer -- yes of course 
its possible to do what you've asked!


search.xq in your scenario just needs to access a parameter and run a 
search based on that.


So this kind of expression will do what you're looking for:

let $text := xdmp:get-request-field("text")
return search:search($text, )

The first line is how to put a field value into a variable.  The second 
line is a search API call.  I direct you to the Search Developer's Guide 
http://docs.marklogic.com/guide/search-dev for examples and docs on 
search:search.


Charles



On 01/23/2013 12:31 AM, Shibu N 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
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


--
Charles Greer
Senior Engineer
MarkLogic Corporation
charles.gr...@marklogic.com
Phone: +1 707 408 3277
www.marklogic.com

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


Re: [MarkLogic Dev General] Help - Will Marklogic support calling query with parameters

2013-01-23 Thread Erik Hennum
Hi, Shibu:

If the built-in search capabilities of the REST API aren't sufficient, you
can extend the REST API write new resource services in XQuery.  Please
see:

http://docs.marklogic.com/guide/rest-dev/extensions


Erik Hennum


From: general-boun...@developer.marklogic.com 
[general-boun...@developer.marklogic.com] on behalf of Shibu N 
[n.sh...@yahoo.com]
Sent: Wednesday, January 23, 2013 2:21 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  wrote:

From: Justin Makeig 
Subject: Re: [MarkLogic Dev General] Help - Will Marklogic support calling 
query with parameters
To: "MarkLogic Developer Discussion" 
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
justin.mak...@marklogic.com
www.marklogic.com<http://www.marklogic.com/>



On Jan 23, 2013, at 12:31 AM, Shibu N >
 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
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


-Inline Attachment Follows-

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

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


Re: [MarkLogic Dev General] Help - Will Marklogic support calling query with parameters

2013-01-23 Thread Eric Bloch
There is a relatively detailed tutorial at 
http://developer.marklogic.com/learn/java as well.  Search is discussed at 
http://developer.marklogic.com/learn/java/basic-search

Best,
Eric


From: general-boun...@developer.marklogic.com 
[general-boun...@developer.marklogic.com] on behalf of Justin Makeig 
[justin.mak...@marklogic.com]
Sent: Wednesday, January 23, 2013 12:48 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Help - Will Marklogic support calling 
querywith parameters

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
justin.mak...@marklogic.com<mailto:justin.mak...@marklogic.com>
www.marklogic.com<http://www.marklogic.com/>



On Jan 23, 2013, at 12:31 AM, Shibu N 
mailto:n.sh...@yahoo.com>>
 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
General@developer.marklogic.com<mailto:General@developer.marklogic.com>
http://developer.marklogic.com/mailman/listinfo/general
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Help - Will Marklogic support calling query with parameters

2013-01-23 Thread David Lee
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
d...@marklogic.com
Phone: +1 812-482-5224
Cell:  +1 812-630-7622
www.marklogic.com<http://www.marklogic.com/>


From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] 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  wrote:

From: Justin Makeig 
Subject: Re: [MarkLogic Dev General] Help - Will Marklogic support calling 
query with parameters
To: "MarkLogic Developer Discussion" 
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
justin.mak...@marklogic.com
www.marklogic.com<http://www.marklogic.com/>


On Jan 23, 2013, at 12:31 AM, Shibu N 
>
 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
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


-Inline Attachment Follows-
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


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


Re: [MarkLogic Dev General] Help - Will Marklogic support calling query with parameters

2013-01-23 Thread Shibu N
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  wrote:

From: Justin Makeig 
Subject: Re: [MarkLogic Dev General] Help - Will Marklogic support calling 
query with parameters
To: "MarkLogic Developer Discussion" 
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
justin.mak...@marklogic.com
www.marklogic.com





On Jan 23, 2013, at 12:31 AM, Shibu N  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
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


-Inline Attachment Follows-

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


Re: [MarkLogic Dev General] Help - Will Marklogic support calling query with parameters

2013-01-23 Thread Justin Makeig
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 . 
You can also download the JARs (or access the Maven repository) from 
. 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
justin.mak...@marklogic.com
www.marklogic.com



On Jan 23, 2013, at 12:31 AM, Shibu N 
 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
> General@developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general



smime.p7s
Description: S/MIME cryptographic signature
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general