[Corona] Adding a sub-place to a place

Scott Stafford Scott.Stafford at marklogic.com
Wed Apr 11 11:36:14 PDT 2012


I have the following use case.

Document 1
<person>
  <name>Joe</name>
</person>

Document 2
<company>
  <name>Acme Inc.</name>
</company>

I want to return document 1 using this named query: /search?stringQuery=person:Joe
I want to return document 2 using this named query: /search?stringQuery=company:Acme

I have set up a named place called "name" which queries from the /name element.

I have also tried to create a named place called "person" and referenced the sub-place "name".

POST /manage/place/person?element=person
POST /manage/place/person?place=name

When I try a 'person' named query I get a 500 stack overflow error.  Is a sub-place appropriate for this use case?

Scott

>From namespaces: I noticed some escape characters in with the name subplace.  Is this normal?
http://xqdev.com/prop/xml/
<index+type%3d"place"+name%3d"person"+mode%3d"textContains">
 <options/>
 <query>
  <element+element%3d"foaf%3aPerson"+weight%3d"1"+type%3d"include"/>
  <place+name%3d"name%26%2310;%26%239;%26%239;"/>
 </query>
</index>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/corona/attachments/20120411/21692c4b/attachment.html 


More information about the Corona mailing list