On Mon, 05 Mar 2012 09:45:27 -0800, Tom Hubschman
<[email protected]> wrote:
> Would somebody be so kind as to email me a sample query, which could
> be executed in CQ, that queries a database of documents using both a
> keyword AND a circle 100 miles from the radius of a point? Below is the
> document structure and I have highlighted the latitude and longitude
> tags. Thanks so much!
Something like this (assuming right binding for 'wg' prefix)
cts:search( doc(),
cts:and-query((
"some word or phrase",
cts:element-pair-geospatial-query(
xs:QName("wg:physical-address"),
xs:QName("wg:latitude"),
xs:QName("wg:longitude"),
cts:circle(100, cts:point(43.2,-112.2)))
))
)
If you want good performance you'll need to have
an element pair geospatial range index set up
on the same triple.
//Mary
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general