I think I found the explanation myself. 

qbe Queries in JSON only retrieve JSON Documents and qbe Queries in XML only
retrieve XML Documents

Am I right?

Martin

-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Martin
Vollmix
Gesendet: Dienstag, 23. Juni 2015 14:33
An: 'MarkLogic Developer Discussion'
Betreff: [MarkLogic Dev General] Confusion about REST API results

Hi,

I have one JSON and one XML Document in my Database and both of them have a
key named manufacturer:

<?xml version="1.0" encoding="UTF-8"?>
<cars>
        <manufacturer>"BMW"</manufacturer>
        <model>"335i"</model>
        <power>272</power>
        <maxspeed>245</maxspeed>
</cars>

And 

{
        manufacturer:  "BMW",
        model:  "530d",
        power: 231,
        maxspeed: 240
}

Now I did a REST search like this
http://localhost:8003/v1/search?q=BMW&format=json
I get back 2 hits as expected

But if I do a qbe query like this: http://localhost:8003/v1/qbe?format=json
with
{
        $query: {
        $word: "BMW"
    }
}

The result is only one hit for the JSON Document

Any Explanation?

Thanks in advance

Martin
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to