Phil.B
September 14, 2023, 5:04pm
1
Hello there.
Let say that I’ve have some pages with the following tag and property :
tags:: Fiche Album
musicien·ne·s:: **#[[Frank Zappa]]**
I would like to query all the pages with this page-tag and this property with value equal to #[[Frank Zappa]]
By using the Live Query Builder I have obtained the following simple query :
{{query (and (page-tags [[fiche album]]) (page-property :musicien·ne·s "**#[[Frank Zappa]]**"))(page-tags [[fiche album]])(page-tags [[fiche album]])}}
But, the result of this query is : No matched result
Any help on this query ?
Do I have to switch to advanced query ? If so, what would be the query syntaxe ?
alex0
September 14, 2023, 5:17pm
2
It seems something went wrong with the query builder, it got the query right for the first part but then added wrong pieces. Try this one:
{{query (and (page-tags [[fiche album]]) (page-property :musicien·ne·s “#[[Frank Zappa]]”))}}
or
{{query (and (page-tags [[fiche album]]) (page-property :musicien·ne·s “[[Frank Zappa]]”))}}
(I just removed the #: the hashtag syntax is just like [[wikilinks]] but rendered with a different style, so in query it doesn’t matter)
Phil.B
September 14, 2023, 5:24pm
3
Hum, by using your query:
{{query (and (page-tags [[fiche album]]) (page-property :musicien·ne·s “#[[Frank Zappa]]”))}}
the result is the same: No matched result
But I didn’t mention that actually the Property Value is surrounded by ** (bold)
Nevertheless by trying
{{query (and (page-tags [[fiche album]]) (page-property :musicien·ne·s “#[[Frank Zappa]] ”))}}
the result is the same : No matched result
Phil.B
September 14, 2023, 5:26pm
4
for the second query I surrounded #[[Frank Zappa]] with ** (but the ** are interpreted as bold in the forum).
So the real query is:
{{query (and (page-tags [[fiche album]]) (page-property :musicien·ne·s “**#[[Frank Zappa]]**”))}}
but as I said before the result is : No matched result
alex0
September 14, 2023, 5:45pm
5
It must be the problem since in general you can’t use italics and bold to style hashtags and in the property itself you shouldn’t see a proper tag. As a result the query can’t find that page.
Phil.B
September 14, 2023, 5:59pm
6
You are right.
If I change my page as :
tags:: Fiche Album
musicien·ne·s:: [[Frank Zappa]]
the following query:
{{query (and (page-tags [[fiche album]]) (page-property :musicien·ne·s [[Frank Zappa]]))}}
produce the good result.
Please notice that if I use :
tags:: Fiche Album
musicien·ne·s:: #[[Frank Zappa]]
the same query works well (without adding the # in the property value).
Thank you for your help on this topic.