[MarkLogic Dev General] XCC AdHocQuery versus CQ Queries

Ron Hitchens ron at ronsoft.com
Wed Mar 7 08:17:31 PST 2012


   A given query should work the same.  But there are
environmental differences that can come into play.

   You will always be running an XCC query and a CQ
query on different appservers (the former XDBC/XCC and
that latter HTTP).  Make sure the database settings for
each are the same.  CQ will let you choose a different
database to run a query against.  That can also be
done with XCC, but it's usually defaulted to the appserver
setting.

   If your query is importing any library modules,
having different module roots for the two appservers
can cause unresolved import errors on one or the other.

   If your query is not throwing an error, but coming
up with no results, make sure it's running in the correct
database and that namespaces are not tripping you up.
Or that you're not depending on XPath contexts that may
not be the same across environments.

On Mar 7, 2012, at 4:06 PM, Tom Hubschman wrote:

> Hi All,
> 
> Is there any difference between executing an query in CQ and in a XCC java (version 4.2)? My geoquery works in CQ but not XCC.
> 
> Specifically using this XCC method: http://developer.marklogic.com/pubs/4.2/javadoc/com/marklogic/xcc/Session.html#newAdhocQuery(java.lang.String)
> 
> Thanks everyone!
> 
> Tom
> 
> -- 
> Thomas Hubschman
> Director, Engineering
> tom.hubschman at warriorgateway.org
> Mobile: (415) 612-0359
> www.warriorgateway.org
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general

---
Ron Hitchens {mailto:ron at ronsoft.com}   Ronsoft Technologies
     +44 7879 358 212 (voice)          http://www.ronsoft.com
     +1 707 924 3878 (fax)              Bit Twiddling At Its Finest
"No amount of belief establishes any fact." -Unknown






More information about the General mailing list