When I use DisplayTable macro the "Exclude-Self" option doesn't work fine, because it shows current page instead of exclude it.
I've seen the lucene query something like "AND -PageID:5075807" when "Exclude-Self" is true. Instead of that, I write Where clause like "PageID NOT 5075807" and works fine.
Can be a possible bug?
We are using Confluence 5.9.8 and projectdoc toolbos 1.10.3
The query doesn't work is:
query=(DirectAncestorId:50758072 AND -PageID:50758072) AND (DoctypeExact:"userxcharacter"),category=<null>,spaceKeys=<null>,contentTypes=[page],attachmentTypes=<null>,lastModified=<null>,contributor=<null>,labels=<null>,sort=<null>]
I unchecked Exclude-Self option and I write "PageID NOT 50758072" in Where field, then the query is:
query=(DirectAncestorId:50758072 AND PageID NOT 50758072) AND (DoctypeExact:"userxcharacter"),category=<null>,spaceKeys=<null>,contentTypes=[page],attachmentTypes=<null>,lastModified=<null>,contributor=<null>,labels=<null>,sort=<null>]
This query works as expected.
I've just to update projectdoc toolbox to version 1.11.0 and the issue is the same.
Thank you for your report!
I'm sorry to say that I still need your help to track this down.
To my knowledge these are valid queries:
Doctype="user-character" NOT PageID=41451771
Doctype="user-character" AND -PageID:41451771
But this is not
Doctype="user-character" AND PageID NOT 41451771
While the first two create the intended results (the page with the given ID is excluded), the last example shows the empty list (which is wrong since I have three documents of type 'user-character').
Here are the screenshots:
image2016-5-13 11:8:18.png
The above shows the query with all documents in the result.
image2016-5-13 11:8:53.png
It would help us to track the problem down if you could describe your use case.
Maybe the pages have been moved by third party add-ons? In some cases theses add-ons do not throw page events and projectdoc does not get noticed. In this case the properties may not have been updated. You could check the actual properties of the pages by the use of the Display All Document Properties Macro. Maybe the artificial Page ID
property is out of sync? Just in case: Documentation for cache clearing is found in Cache Refresh Actions.
And while I'm clutching at straws ... : The page ID of your first example is a prefix of your second. Is the '2' just missing or are pages with a common Page ID prefix involved? In this case the exact match syntax could help (
$<Page ID>:[41451685]
).
Here are some examples in storage format we tested (and did not reveal the problem). Maybe you could point to the fault in our setup?
<ac:structured-macro ac:name="projectdoc-display-table"> <ac:parameter ac:name="doctype">topic</ac:parameter> <ac:parameter ac:name="where">DirectAncestorId=15597571 AND -PageID:15597579</ac:parameter> <ac:parameter ac:name="exclude-self">false</ac:parameter> </ac:structured-macro>
<ac:structured-macro ac:name="projectdoc-display-table"> <ac:parameter ac:name="doctype">topic</ac:parameter> <ac:parameter ac:name="where">DirectAncestorId=15597571 NOT PageID=15597579</ac:parameter> <ac:parameter ac:name="exclude-self">false</ac:parameter> </ac:structured-macro>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just another observation: I suppose that
DirectAncestorId:50758072 AND -PageID:50758072
should have the same result as
DirectAncestorId:50758072
Since no page should be the direct ancestor of itself. Therefore there should be no need to exclude the page from the list ...
Or am I missing here something?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Robert, you're right and I'm wrong. The second query doesn't return any results, meanwhile "NOT PageID=50758072" (sorry, the last 2 was removed by copy/paste) returns several documents.
I've tried to retrieve subordinates UserCharacters from a UserCharacter parent. The macro shows all subordinates UserCharacters and the self UserCharacter parent. But this occurs with whatever document type.
When I use DisplayMacro, always retrieves the self document, no matter Exclude-Sefl option is checked or not. For example, subordinates UserStory also shows the UserStory parent, even if Exclude-Sef is true.
I 've cleared all caches and the issue persists.
Also, If I put "Exclude-Self" and "Restrict to inmediate Children" to false and I write "DirectAncestorId:50758087 AND -PageID:50758087" it shows the self document.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So I'm afraid I have still no clue ...
May I ask you for the following:
<
ac:structured-macro
...) so that I can see all parameters and therefore can rule out that I make invalid assumptionsPage ID
and DirectAncestorId
information for the involved pages (using e.g. the Display All Document Properties Macro)I'm very sorry for this inconvenience, but I still cannot reproduce the problem ...
And just in case ... if you add
NOT PageID=50758087
to the WHERE field (without anything else) it is the same as
PageID=50758087
The stopword "NOT
" is simply removed. This is because Lucene requires to have a positive selection before a negative one is allowed. But this does not explain why checking the Exclude Self option has no effect ...
Does the following have the same (unwanted) result in your configuration?
Doctype:user-character AND -PageID:50758087
(or 50758072
instead of 50758087
)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
At last, I use Luke to see the Confluence index and I notice that DirectAncestorId and ParentID aren't indexed although they are stored.
Using Luke search tab I cannot retrieve any results for "PageID:507580872" or "DirectAncestorID:507580872".
PageID_no_term.jpgDirectAncestorID_no_term.jpg
I clear caché, reindex the content and anything works
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the update!
The Page ID
has been introduced with version 1.5 (28th March 2015). Prior to this the identifier has been stored by the key ID
. Maybe the page has been created with an older version? Evidence is that after a reindex the queries - as you reported - are working.
The problem seems to be that we did not clearly state in the release notes that a reindex is required. We'll track this issue more carefully in the future.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Finally, I found the problem. The indexing Language (in General Configuration) was selected "Other" from the dropdown list. I changed to English and reindexed the content.
Now, Display Table Macro works as expected!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We have tested the Exclude-Self feature with the latest projectdoc Toolbox (version 1.10.3) on Confluence 5.9.10 and (unfortunately) it works as intended (using the syntax "... AND -PageID:5075807
...).
May I ask you for the version of the projectdoc Toolbox and Confluence so that we could try to reproduce the problem? It would also help if you could add the query you are executing. Maybe there is a problem with the construction of the query. We tried some combinations, but everything worked fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.