Hi David,

Thanks. I have already gone through the search and rest-api guides. But I'm
still not able to figure out a solution for my requirement.

I have the an application built using app builder. I have done some
customization in the application. The customization is as below:
1. When a user performs a search and clicks on the "Export" link (custom
link created) in the results page, a new document is getting generated in
the DB.

2. The new document created in the DB has the json query string as an entry
in it.
Example of the document in DB:
<QueryString>{"text":"","page":1,"facets":{"city":{"constraintType":"range","noShadow":true,"value":["Paris"]}}}</QueryString>

3. Now, what I need to know is, how do I reproduce my search results by
executing this json query string?

4. It is said that the json has to be converted into xml. Which is the
function that I should use, json:transform-from-json() OR xdmp:from-json?

5. If I get an xml format, how do I call the search:search to perform the
query. In the above example, I need to search for city:Paris.


Please help.

Thanks,
Sini


On Mon, Feb 11, 2013 at 5:51 PM, David Lee <[email protected]> wrote:

>  Ultimately AppBuilder ends up using search:search or cts:search in "the
> back end"  (MarkLogic DB).****
>
> JSON is converted to XML to perform the searches.****
>
> ** **
>
> A good start for understanding search concepts from the server perspective
> is :****
>
> http://docs.marklogic.com/guide/search-dev****
>
> ** **
>
> JavaScript code in AppBuilder uses the REST API which under the hood uses
> the above.****
>
> http://docs.marklogic.com/guide/rest-dev****
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
>
> -----------------------------------------------------------------------------
> ****
>
> David Lee
> Lead Engineer
> MarkLogic Corporation
> [email protected]
> Phone: +1 812-482-5224****
>
> Cell:  +1 812-630-7622
> www.marklogic.com
>
> ****
>
> ** **
>
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *sini narayanan
> *Sent:* Sunday, February 10, 2013 11:57 PM
> *To:* MarkLogic Developer Discussion
> *Subject:* [MarkLogic Dev General] Search Query****
>
> ** **
>
> Hi all,****
>
> ** **
>
> How exactly is the search happening at the backend when we search for a
> particular document in the application builder?****
>
> Is it in json format or something else. Please calrify.****
>
> In the controller.js file, I noticed that the query string formed is in
> json format. Is this json query converted into some other format to search
> the DB?****
>
> ** **
>
> If I have a json query, how do I search DB with the same.****
>
> ** **
>
> For example: If i have the json query like below, can I use the same to
> query the DB seperately in QC.****
>
> ** **
>
>
> {"text":"","page":1,"facets":{"city":{"constraintType":"range","noShadow":true,"value":["Paris"]}}}
> ****
>
> ** **
>
> Thanks,****
>
> Sini****
>
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
>
>
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to