[Corona] Adding a sub-place to a place

Ryan Grimm grimm at xqdev.com
Wed Apr 11 11:47:40 PDT 2012


No, I don't believe that this is a use case that MarkLogic currently supports, and hence Corona can't either :). To support such an operation, MarkLogic fields (and/or element word queries) would need to support XPaths.

Sub-places in Corona can be thought of as more of an object inheritance model than a document structure model. Including place "A" inside place "B" simply tells place "B" to include all of the configuration from place "A". So if place "A" was configured to included elements "foo" and "bar", then place "B" is configured to include the element "baz" along with place "A", the result will be that place "B" includes elements "foo", "bar" and "baz".

Does that clear things up or muddy the water?

--Ryan


On Apr 11, 2012, at 11:36 AM, Scott Stafford wrote:

> 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>
> _______________________________________________
> Corona mailing list
> Corona at developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/corona



More information about the Corona mailing list