Backend Query Tool Question

43 views
Skip to first unread message

Henry Versemann

unread,
Jul 12, 2012, 12:33:45 PM7/12/12
to dot...@googlegroups.com

Can the new backend query tool be used with $dotcontent.pullRelated type queries? If so is the syntax the same as when coding the pull in a velocity statement?

 

Henry

 

Chris Falzone

unread,
Jul 12, 2012, 12:43:25 PM7/12/12
to dot...@googlegroups.com
If you are talking about CMS Admin > Query Test Tool, then yet.  Though do not need the $dotcontent.pull part, just the query you would pass to it.  It is an extremely helpful tool for diagnosing issues in the cache or index.  Also, it can be useful for finding things that seem difficult to find in the Content Search Manager Tooling.  Like when you have an identifier and want to know what it is you can do +identifier:whatever and bingo.

On Thu, Jul 12, 2012 at 12:33 PM, Henry Versemann <hvers...@stchas.edu> wrote:

Can the new backend query tool be used with $dotcontent.pullRelated type queries? If so is the syntax the same as when coding the pull in a velocity statement?

 

Henry

 

--
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To post to this group, send email to dot...@googlegroups.com.
To unsubscribe from this group, send email to dotcms+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dotcms?hl=en.

Henry Versemann

unread,
Jul 12, 2012, 12:56:21 PM7/12/12
to dot...@googlegroups.com

I’m having problems getting any of the converted 1.9 queries working for one widget, so I was trying to figure out the problems using this tool but so far it too has failed to pull back anything for me so I suspect that my converted query is not coded properly. My original 1.7 query looks like this:

 

"Success_Stories-News_Item" "$id" "3" "date1 asc" (using the pullRelatedContent macro)

 

So I’ve tried to convert it to this:

 

'Success_Stories-News_Item',’9906b281-bfe3-499b-ac86-be7729b75f9c’,'',false,3,'newsItem.NewsPublishDate asc'

 

The original query pulls back data just fine when used in a widget when I include the id parameter in the url and refresh the page it’s on, but so far I’ve not gotten anything at all out of the new 1.9 version of it. I’ve tried several different variations of it, but so far nothing has worked, at all.  

Maria Ahues Bouza

unread,
Jul 12, 2012, 1:24:56 PM7/12/12
to dot...@googlegroups.com
Henry,

The Query Test tool accepts lucene queries,what you have here are the parameters for the pullRelatedContent macro.

I'd recommend using the tool
$dotcontent.pullRelated

You can see examples here
http://dotcms.com/docs/2.0/PullingAndDisplayingRelatedContent

This should work in your case

#foreach($content in $dotcontent.pullRelated("Success_Stories-News_Item","9906b281-bfe3-499b-ac86-be7729b75f9c",false,3,"newsItem.NewsPublishDate asc")

$content

#end

Thanks
Maria
Community Manager

dotCMS
Main: 305.900.2001
Fax: 305.397.2579
www.dotcms.com
http://www.twitter.com/dotCMS
http://www.facebook.com/dotCMS
http://www.twitter.com/mabouza

Please consider the planet before printing this email.

Henry Versemann

unread,
Jul 12, 2012, 1:30:07 PM7/12/12
to dot...@googlegroups.com

Maria,

 

I tried coding the query within the $dotcontent.pullRelated macro/tool first and it didn’t work there. So I was trying to determine why the query wasn’t working there by putting it into the backend query tool. So a pullRelated type of query won’t work in the backend query tool then?

 

Henry

Maria Ahues Bouza

unread,
Jul 12, 2012, 1:31:34 PM7/12/12
to dot...@googlegroups.com
Henry,

Pull Related doesn't receive a query, it receives the name of a relationship and an optional lucene condition and it builds the query inside the macro. So no if you copy/paste what you have there on the Query Test Tool it won't return anything.

Thanks
Maria

Chris Falzone

unread,
Jul 12, 2012, 1:56:57 PM7/12/12
to dot...@googlegroups.com
Did you try changing false to true.  I never remember which is parents/children.

Henry Versemann

unread,
Jul 12, 2012, 1:59:21 PM7/12/12
to dot...@googlegroups.com

No I have not tried that yet. I believe that false is for children while true is for parents. I’m more concerned that the pullrelated query parameters are not coded correctly. I will try that soon too. Thanks.

Jonathan Laughlin

unread,
Jul 12, 2012, 2:01:00 PM7/12/12
to dot...@googlegroups.com
Also note that the example Maria provided is missing an extra parantheses at the end. Should be:

#foreach($content in $dotcontent.pullRelated("Success_Stories-News_Item","9906b281-bfe3-499b-ac86-be7729b75f9c",false,3,"newsItem.NewsPublishDate asc"))

I think this error is in the documentation as well.

Jonathan

>>> Henry Versemann <hvers...@stchas.edu> 7/12/2012 1:59 PM >>>
No I have not tried that yet. I believe that false is for children while true is for parents. I'm more concerned that the pullrelated query parameters are not coded correctly. I will try that soon too. Thanks.

From: dot...@googlegroups.com [mailto:dot...@googlegroups.com] On Behalf Of Chris Falzone
Sent: Thursday, July 12, 2012 12:57 PM
To: dot...@googlegroups.com
Subject: Re: [dotcms] Backend Query Tool Question

Did you try changing false to true. I never remember which is parents/children.
On Thu, Jul 12, 2012 at 1:31 PM, Maria Ahues Bouza <ma...@dotcms.com<mailto:ma...@dotcms.com>> wrote:
Henry,

Pull Related doesn't receive a query, it receives the name of a relationship and an optional lucene condition and it builds the query inside the macro. So no if you copy/paste what you have there on the Query Test Tool it won't return anything.

Thanks
Maria

On Thu, Jul 12, 2012 at 10:30 AM, Henry Versemann <hvers...@stchas.edu<mailto:hvers...@stchas.edu>> wrote:
Maria,

I tried coding the query within the $dotcontent.pullRelated macro/tool first and it didn't work there. So I was trying to determine why the query wasn't working there by putting it into the backend query tool. So a pullRelated type of query won't work in the backend query tool then?

Henry

From: dot...@googlegroups.com<mailto:dot...@googlegroups.com> [mailto:dot...@googlegroups.com<mailto:dot...@googlegroups.com>] On Behalf Of Maria Ahues Bouza
Sent: Thursday, July 12, 2012 12:25 PM

To: dot...@googlegroups.com<mailto:dot...@googlegroups.com>
Subject: Re: [dotcms] Backend Query Tool Question

Henry,

The Query Test tool accepts lucene queries,what you have here are the parameters for the pullRelatedContent macro.

I'd recommend using the tool
$dotcontent.pullRelated

You can see examples here
http://dotcms.com/docs/2.0/PullingAndDisplayingRelatedContent

This should work in your case

#foreach($content in $dotcontent.pullRelated("Success_Stories-News_Item","9906b281-bfe3-499b-ac86-be7729b75f9c",false,3,"newsItem.NewsPublishDate asc")

$content

#end

Thanks
Maria
On Thu, Jul 12, 2012 at 9:56 AM, Henry Versemann <hvers...@stchas.edu<mailto:hvers...@stchas.edu>> wrote:
I'm having problems getting any of the converted 1.9 queries working for one widget, so I was trying to figure out the problems using this tool but so far it too has failed to pull back anything for me so I suspect that my converted query is not coded properly. My original 1.7 query looks like this:

"Success_Stories-News_Item" "$id" "3" "date1 asc" (using the pullRelatedContent macro)

So I've tried to convert it to this:

'Success_Stories-News_Item','9906b281-bfe3-499b-ac86-be7729b75f9c','',false,3,'newsItem.NewsPublishDate asc'

The original query pulls back data just fine when used in a widget when I include the id parameter in the url and refresh the page it's on, but so far I've not gotten anything at all out of the new 1.9 version of it. I've tried several different variations of it, but so far nothing has worked, at all.



From: dot...@googlegroups.com<mailto:dot...@googlegroups.com> [mailto:dot...@googlegroups.com<mailto:dot...@googlegroups.com>] On Behalf Of Chris Falzone
Sent: Thursday, July 12, 2012 11:43 AM
To: dot...@googlegroups.com<mailto:dot...@googlegroups.com>
Subject: Re: [dotcms] Backend Query Tool Question

If you are talking about CMS Admin > Query Test Tool, then yet. Though do not need the $dotcontent.pull part, just the query you would pass to it. It is an extremely helpful tool for diagnosing issues in the cache or index. Also, it can be useful for finding things that seem difficult to find in the Content Search Manager Tooling. Like when you have an identifier and want to know what it is you can do +identifier:whatever and bingo.
On Thu, Jul 12, 2012 at 12:33 PM, Henry Versemann <hvers...@stchas.edu<mailto:hvers...@stchas.edu>> wrote:
Can the new backend query tool be used with $dotcontent.pullRelated type queries? If so is the syntax the same as when coding the pull in a velocity statement?

Henry

--
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To post to this group, send email to dot...@googlegroups.com<mailto:dot...@googlegroups.com>.
To unsubscribe from this group, send email to dotcms+un...@googlegroups.com<mailto:dotcms%2Bunsu...@googlegroups.com>.
For more options, visit this group at http://groups.google.com/group/dotcms?hl=en.

--
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To post to this group, send email to dot...@googlegroups.com<mailto:dot...@googlegroups.com>.
To unsubscribe from this group, send email to dotcms+un...@googlegroups.com<mailto:dotcms+un...@googlegroups.com>.
For more options, visit this group at http://groups.google.com/group/dotcms?hl=en.
--
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To post to this group, send email to dot...@googlegroups.com<mailto:dot...@googlegroups.com>.
To unsubscribe from this group, send email to dotcms+un...@googlegroups.com<mailto:dotcms%2Bunsu...@googlegroups.com>.
For more options, visit this group at http://groups.google.com/group/dotcms?hl=en.



--
Community Manager

dotCMS
Main: 305.900.2001<tel:305.900.2001>
Fax: 305.397.2579<tel:305.397.2579>
www.dotcms.com<http://www.dotcms.com>
http://www.twitter.com/dotCMS
http://www.facebook.com/dotCMS
http://www.twitter.com/mabouza

Please consider the planet before printing this email.
--
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To post to this group, send email to dot...@googlegroups.com<mailto:dot...@googlegroups.com>.
To unsubscribe from this group, send email to dotcms+un...@googlegroups.com<mailto:dotcms+un...@googlegroups.com>.
For more options, visit this group at http://groups.google.com/group/dotcms?hl=en.
--
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To post to this group, send email to dot...@googlegroups.com<mailto:dot...@googlegroups.com>.
To unsubscribe from this group, send email to dotcms+un...@googlegroups.com<mailto:dotcms%2Bunsu...@googlegroups.com>.
For more options, visit this group at http://groups.google.com/group/dotcms?hl=en.



--
Community Manager

dotCMS
Main: 305.900.2001<tel:305.900.2001>
Fax: 305.397.2579<tel:305.397.2579>
www.dotcms.com<http://www.dotcms.com>
http://www.twitter.com/dotCMS
http://www.facebook.com/dotCMS
http://www.twitter.com/mabouza

Please consider the planet before printing this email.
--
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To post to this group, send email to dot...@googlegroups.com<mailto:dot...@googlegroups.com>.
To unsubscribe from this group, send email to dotcms+un...@googlegroups.com<mailto:dotcms%2Bunsu...@googlegroups.com>.
For more options, visit this group at http://groups.google.com/group/dotcms?hl=en.

--
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To post to this group, send email to dot...@googlegroups.com<mailto:dot...@googlegroups.com>.
To unsubscribe from this group, send email to dotcms+un...@googlegroups.com<mailto:dotcms+un...@googlegroups.com>.

Maria Ahues Bouza

unread,
Jul 12, 2012, 2:24:00 PM7/12/12
to dot...@googlegroups.com
Jonathan, Good catch!

I just updated the docs with the missing parenthesis.

Thanks
Maria
Fax: 305.397.2579
www.dotcms.com
Reply all
Reply to author
Forward
0 new messages