[MarkLogic Dev General] Sample XQuery Geo Query Please

Tom Hubschman tom.hubschman at warriorgateway.org
Mon Mar 5 09:45:27 PST 2012


Hello All,

    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!

<?xml version="1.0" encoding="UTF-8"?>
<wg_provider xmlns="http://www.warriorgateway.org/WGProvider.xsd">
    <ein>54-1679023</ein>
    <name>AMHERST COUNTY COMMISSION AGAINST DOMESTIC VIOLENCE</name>
    <is_virtual>false</is_virtual>
    <contact_information>
        <contact_person>
            <first_name/>
            <last_name/>
            <title/>
            <email/>
            <phone/>
        </contact_person>
        <physical_address>
            <address_line_1>PO Box 1157</address_line_1>
            <address_line_2/>
            <city>Amherst</city>
            <state>VA</state>
            <zip_code>24521</zip_code>
*            <latitude>38.6270025</latitude>*
*            <longitude>-90.19940419999999</longitude>*
        </physical_address>
        <phone_numbers>
            <phone_1/>
        </phone_numbers>
        <web_addresses>
            <email/>
            <url/>
        </web_addresses>
    </contact_information>
    <description>Assistance to victims and families of domestic violence.

ACCADV 24-hour Crisis Helpline, Crisis Counseling &amp; Supportive
Counseling: Trained volunteers offer abused victims help, support,
information &amp; referral on community resources</description>
    <coverage_area>
        <zip_code>24521</zip_code>
        <range_in_miles>0</range_in_miles>
    </coverage_area>
    <source_data>
        <guidestar_data>
            <ein>54-1679023</ein>
            <name>AMHERST COUNTY COMMISSION AGAINST DOMESTIC VIOLENCE</name>
            <address_line_1>PO Box 1157</address_line_1>
            <address_line_2/>
            <city>Amherst</city>
            <state>VA</state>
            <zip_code>24521</zip_code>
            <deduction_code>1</deduction_code>
            <contact_first_name/>
            <contact_last_name/>
            <contact_title/>
            <contact_email/>
            <contact_phone/>
            <executive_first_name/>
            <executive_last_name/>
            <executive_title/>
            <url/>
            <ntee_code>P43</ntee_code>
            <ntee_description>Family Violence Shelters and
Services</ntee_description>
            <irs_subsection_code>3</irs_subsection_code>
            <irs_subsection_description>Private Foundations and Public
Charities</irs_subsection_description>
            <irs_ruling_year>1994Z</irs_ruling_year>
            <assets>5299</assets>
            <income>79935</income>
            <world_locations/>
            <usa_locations/>
            <name_aka/>
            <mission_statement>Assistance to victims and families of
domestic violence.</mission_statement>
            <program_statement>ACCADV 24-hour Crisis Helpline, Crisis
Counseling &amp; Supportive Counseling: Trained volunteers offer abused
victims help, support, information &amp; referral on community
resources</program_statement>
        </guidestar_data>
    </source_data>
</wg_provider>

Warm regards,

Tom

-- 
Thomas Hubschman
Director, Engineering
tom.hubschman at warriorgateway.org
Mobile: (415) 612-0359
www.warriorgateway.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20120305/32d4ef5a/attachment.html 


More information about the General mailing list