mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
now filters out non blogposts
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14634 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -11,6 +11,9 @@ function getBlogPostList(node, index, count)
|
|||||||
// query information
|
// query information
|
||||||
var luceneQuery = " +TYPE:\"{http://www.alfresco.org/model/content/1.0}content\" " +
|
var luceneQuery = " +TYPE:\"{http://www.alfresco.org/model/content/1.0}content\" " +
|
||||||
" +PATH:\"" + node.qnamePath + "/*\" ";
|
" +PATH:\"" + node.qnamePath + "/*\" ";
|
||||||
|
luceneQuery += " +(@\\{http\\://www.alfresco.org/model/content/1.0\\}content.mimetype:application/octet-stream OR";
|
||||||
|
luceneQuery += " @\\{http\\://www.alfresco.org/model/content/1.0\\}content.mimetype:text/html)"
|
||||||
|
|
||||||
|
|
||||||
// add the drafts part
|
// add the drafts part
|
||||||
luceneQuery += " -ISNOTNULL:\"{http://www.alfresco.org/model/content/1.0}published\" " +
|
luceneQuery += " -ISNOTNULL:\"{http://www.alfresco.org/model/content/1.0}published\" " +
|
||||||
|
@@ -11,6 +11,8 @@ function getBlogPostList(node, index, count)
|
|||||||
// query information
|
// query information
|
||||||
var luceneQuery = " +TYPE:\"{http://www.alfresco.org/model/content/1.0}content\"" +
|
var luceneQuery = " +TYPE:\"{http://www.alfresco.org/model/content/1.0}content\"" +
|
||||||
" +PATH:\"" + node.qnamePath + "/*\" ";
|
" +PATH:\"" + node.qnamePath + "/*\" ";
|
||||||
|
luceneQuery += " +(@\\{http\\://www.alfresco.org/model/content/1.0\\}content.mimetype:application/octet-stream OR";
|
||||||
|
luceneQuery += " @\\{http\\://www.alfresco.org/model/content/1.0\\}content.mimetype:text/html)"
|
||||||
|
|
||||||
// exclude drafts
|
// exclude drafts
|
||||||
luceneQuery += " +ISNOTNULL:\"{http://www.alfresco.org/model/content/1.0}published\" " +
|
luceneQuery += " +ISNOTNULL:\"{http://www.alfresco.org/model/content/1.0}published\" " +
|
||||||
|
@@ -46,6 +46,10 @@ function getBlogPostMonths(node)
|
|||||||
var luceneQuery = " +TYPE:\"{http://www.alfresco.org/model/content/1.0}content\"" +
|
var luceneQuery = " +TYPE:\"{http://www.alfresco.org/model/content/1.0}content\"" +
|
||||||
" +PATH:\"" + node.qnamePath + "/*\" " +
|
" +PATH:\"" + node.qnamePath + "/*\" " +
|
||||||
" +ISNOTNULL:\"{http://www.alfresco.org/model/content/1.0}published\" ";
|
" +ISNOTNULL:\"{http://www.alfresco.org/model/content/1.0}published\" ";
|
||||||
|
luceneQuery += " +(@\\{http\\://www.alfresco.org/model/content/1.0\\}content.mimetype:application/octet-stream OR";
|
||||||
|
luceneQuery += " @\\{http\\://www.alfresco.org/model/content/1.0\\}content.mimetype:text/html)"
|
||||||
|
|
||||||
|
|
||||||
var sortAttribute = "@{http://www.alfresco.org/model/content/1.0}published";
|
var sortAttribute = "@{http://www.alfresco.org/model/content/1.0}published";
|
||||||
nodes = search.luceneSearch(node.nodeRef.storeRef.toString(), luceneQuery, sortAttribute, true);
|
nodes = search.luceneSearch(node.nodeRef.storeRef.toString(), luceneQuery, sortAttribute, true);
|
||||||
|
|
||||||
|
@@ -11,6 +11,8 @@ function getBlogPostList(node, index, count)
|
|||||||
// query information
|
// query information
|
||||||
var luceneQuery = " +TYPE:\"{http://www.alfresco.org/model/content/1.0}content\"" +
|
var luceneQuery = " +TYPE:\"{http://www.alfresco.org/model/content/1.0}content\"" +
|
||||||
" +PATH:\"" + node.qnamePath + "/*\" ";
|
" +PATH:\"" + node.qnamePath + "/*\" ";
|
||||||
|
luceneQuery += " +(@\\{http\\://www.alfresco.org/model/content/1.0\\}content.mimetype:application/octet-stream OR";
|
||||||
|
luceneQuery += " @\\{http\\://www.alfresco.org/model/content/1.0\\}content.mimetype:text/html)"
|
||||||
|
|
||||||
// add the drafts part
|
// add the drafts part
|
||||||
luceneQuery += "+ASPECT:\"{http://www.alfresco.org/model/blogintegration/1.0}blogPost\" "
|
luceneQuery += "+ASPECT:\"{http://www.alfresco.org/model/blogintegration/1.0}blogPost\" "
|
||||||
|
@@ -11,6 +11,9 @@ function getBlogPostList(node, fromDate, toDate, tag, index, count)
|
|||||||
// query information
|
// query information
|
||||||
var luceneQuery = " +TYPE:\"{http://www.alfresco.org/model/content/1.0}content\"" +
|
var luceneQuery = " +TYPE:\"{http://www.alfresco.org/model/content/1.0}content\"" +
|
||||||
" +PATH:\"" + node.qnamePath + "/*\"";
|
" +PATH:\"" + node.qnamePath + "/*\"";
|
||||||
|
luceneQuery += " +(@\\{http\\://www.alfresco.org/model/content/1.0\\}content.mimetype:application/octet-stream OR";
|
||||||
|
luceneQuery += " @\\{http\\://www.alfresco.org/model/content/1.0\\}content.mimetype:text/html)"
|
||||||
|
|
||||||
|
|
||||||
// include all published + my drafts
|
// include all published + my drafts
|
||||||
luceneQuery += " +((" +
|
luceneQuery += " +((" +
|
||||||
|
Reference in New Issue
Block a user