Exclude specific pages from query or #Concept?

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Exclude specific pages from query or #Concept?

precht@gmail.com
Greetings,

Novice to SMW, is there a way to exclude specific pages from a query or
Concept? That is, without adding a new property to the affected pages..

I see there's a select pages feature that works well:
http://semantic-mediawiki.org/wiki/Help:Selecting_pages#Describing_single_pages

Thanks!
------------------------------------------------------------------------------
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Exclude specific pages from query or #Concept?

Cavila Contrafibularity
Does this help?

http://smw.referata.com/wiki/Excluding_a_page_from_an_inline_query

or go to the penultimate version of that page
http://smw.referata.com/w/index.php?title=Excluding_a_page_from_an_inline_query&diff=prev&oldid=8012
(an anonymous user removed some info, such as the link to the roadmap about 'Introduce an Operator to Negate Queries', but I don't know if the edit was legit)

Cav

> Date: Fri, 7 Nov 2014 18:31:51 -0800
> From: [hidden email]
> To: [hidden email]
> Subject: [Semediawiki-user] Exclude specific pages from query or #Concept?
>
> Greetings,
>
> Novice to SMW, is there a way to exclude specific pages from a query or
> Concept? That is, without adding a new property to the affected pages..
>
> I see there's a select pages feature that works well:
> http://semantic-mediawiki.org/wiki/Help:Selecting_pages#Describing_single_pages
>
> Thanks!
> ------------------------------------------------------------------------------
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
     
------------------------------------------------------------------------------
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Exclude specific pages from query or #Concept?

precht@gmail.com
Thanks for the suggestion, this seems to be exactly what I'm seeking. Alas,
I can't get it to work properly... I'm not sure if it's a syntax error on
my end?

This is my Concept, which works fine, but is too inclusive:

{{#Concept: [[:+]] [[Category:Category_name]] }}

Per the example syntax, I've defined some pages with
[[Page_name::{{PAGENAME}}| ]] and verified it in "Browse properties". I
also defined the "Page_name" property as datatype text.

When I try it to incorporate it in the Concept, however, none of these seem
to work:

1) {{#Concept: [[:+]][[Category:Category_name]] [[!Page_name::Undesired
page]] }}
2) {{#Concept: [[:+]][[Category:Category_name]] }} [[!Page_name::Undesired
page]]
3) {{#Concept: [[:+]][[Category:Category_name]] OR }}
[[!Page_name::Undesired page]]
4) {{#Concept: [[:+]][[Category:Category_name]] OR [[!Page_name::Undesired
page]] }}

Number 3 and 4 are obviously incorrect, but just random attempts :)

I wonder if this exclusion/negating method worked in an older version of
SMW, as I see the page refers to the datatype String, which has seen been
deprecated by Text

Any help appreciated!

On Sun, Nov 9, 2014 at 1:37 AM, Cavila <[hidden email]> wrote:

> Does this help?
>
> http://smw.referata.com/wiki/Excluding_a_page_from_an_inline_query
>
> or go to the penultimate version of that page
>
> http://smw.referata.com/w/index.php?title=Excluding_a_page_from_an_inline_query&diff=prev&oldid=8012
> (an anonymous user removed some info, such as the link to the roadmap
> about 'Introduce an Operator to Negate Queries', but I don't know if the
> edit was legit)
>
> Cav
>
> > Date: Fri, 7 Nov 2014 18:31:51 -0800
> > From: [hidden email]
> > To: [hidden email]
> > Subject: [Semediawiki-user] Exclude specific pages from query or
> #Concept?
>
> >
> > Greetings,
> >
> > Novice to SMW, is there a way to exclude specific pages from a query or
> > Concept? That is, without adding a new property to the affected pages..
> >
> > I see there's a select pages feature that works well:
> >
> http://semantic-mediawiki.org/wiki/Help:Selecting_pages#Describing_single_pages
> >
> > Thanks!
> >
> ------------------------------------------------------------------------------
> > _______________________________________________
> > Semediawiki-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>
------------------------------------------------------------------------------
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Exclude specific pages from query or #Concept?

Cavila Contrafibularity
Mmm, the first one should work, at least in principle, provided that you have tagged the unwanted page or pages with [[Page_name::Undesired page]]. Could you try a lowercase initial for #concept ?

Cav

Date: Sun, 9 Nov 2014 02:26:18 -0800
Subject: Re: [Semediawiki-user] Exclude specific pages from query or #Concept?
From: [hidden email]
To: [hidden email]
CC: [hidden email]

Thanks for the suggestion, this seems to be exactly what I'm seeking. Alas, I can't get it to work properly... I'm not sure if it's a syntax error on my end?

This is my Concept, which works fine, but is too inclusive:

{{#Concept: [[:+]] [[Category:Category_name]] }}

Per the example syntax, I've defined some pages with [[Page_name::{{PAGENAME}}| ]] and verified it in "Browse properties". I also defined the "Page_name" property as datatype text.

When I try it to incorporate it in the Concept, however, none of these seem to work:

1) {{#Concept: [[:+]][[Category:Category_name]] [[!Page_name::Undesired page]] }}
2) {{#Concept: [[:+]][[Category:Category_name]] }}  [[!Page_name::Undesired page]]
3) {{#Concept: [[:+]][[Category:Category_name]] OR }}  [[!Page_name::Undesired page]]
4) {{#Concept: [[:+]][[Category:Category_name]] OR [[!Page_name::Undesired page]] }}

Number 3 and 4 are obviously incorrect, but just random attempts :)

I wonder if this exclusion/negating method worked in an older version of SMW, as I see the page refers to the datatype String, which has seen been deprecated by Text

Any help appreciated!

On Sun, Nov 9, 2014 at 1:37 AM, Cavila <[hidden email]> wrote:



Does this help?

http://smw.referata.com/wiki/Excluding_a_page_from_an_inline_query

or go to the penultimate version of that page
http://smw.referata.com/w/index.php?title=Excluding_a_page_from_an_inline_query&diff=prev&oldid=8012
(an anonymous user removed some info, such as the link to the roadmap about 'Introduce an Operator to Negate Queries', but I don't know if the edit was legit)

Cav

> Date: Fri, 7 Nov 2014 18:31:51 -0800
> From: [hidden email]
> To: [hidden email]
> Subject: [Semediawiki-user] Exclude specific pages from query or #Concept?
>
> Greetings,
>
> Novice to SMW, is there a way to exclude specific pages from a query or
> Concept? That is, without adding a new property to the affected pages..
>
> I see there's a select pages feature that works well:
> http://semantic-mediawiki.org/wiki/Help:Selecting_pages#Describing_single_pages
>
> Thanks!
> ------------------------------------------------------------------------------
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
     

     
------------------------------------------------------------------------------
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Exclude specific pages from query or #Concept?

precht@gmail.com
Thanks, lowercase concept seems to be the same as Uppercase

Basically adding [[!Page_name::Undesired page]] to the Concept empties it
of all pages, basically excluding them all.

By the way, I defined the undesired pages with [[Page_name::{{PAGENAME}}|
]], not literally "Undesired page" as the value.

Would you perchance use IRC or Skype? I've been in the official SMW IRC
channel off and on for most of the past 3 days and there's basically no one
alive...

Thanks!

On Mon, Nov 10, 2014 at 3:19 AM, Cavila <[hidden email]>
wrote:

> Mmm, the first one should work, at least in principle, provided that you
> have tagged the unwanted page or pages with [[Page_name::Undesired page]].
> Could you try a lowercase initial for #concept ?
>
> Cav
>
> ------------------------------
> Date: Sun, 9 Nov 2014 02:26:18 -0800
> Subject: Re: [Semediawiki-user] Exclude specific pages from query or
> #Concept?
> From: [hidden email]
> To: [hidden email]
> CC: [hidden email]
>
>
> Thanks for the suggestion, this seems to be exactly what I'm seeking.
> Alas, I can't get it to work properly... I'm not sure if it's a syntax
> error on my end?
>
> This is my Concept, which works fine, but is too inclusive:
>
> {{#Concept: [[:+]] [[Category:Category_name]] }}
>
> Per the example syntax, I've defined some pages with
> [[Page_name::{{PAGENAME}}| ]] and verified it in "Browse properties". I
> also defined the "Page_name" property as datatype text.
>
> When I try it to incorporate it in the Concept, however, none of these
> seem to work:
>
> 1) {{#Concept: [[:+]][[Category:Category_name]] [[!Page_name::Undesired
> page]] }}
> 2) {{#Concept: [[:+]][[Category:Category_name]] }} [[!Page_name::Undesired
> page]]
> 3) {{#Concept: [[:+]][[Category:Category_name]] OR }}
> [[!Page_name::Undesired page]]
> 4) {{#Concept: [[:+]][[Category:Category_name]] OR [[!Page_name::Undesired
> page]] }}
>
> Number 3 and 4 are obviously incorrect, but just random attempts :)
>
> I wonder if this exclusion/negating method worked in an older version of
> SMW, as I see the page refers to the datatype String, which has seen been
> deprecated by Text
>
> Any help appreciated!
>
> On Sun, Nov 9, 2014 at 1:37 AM, Cavila <[hidden email]>
> wrote:
>
> Does this help?
>
> http://smw.referata.com/wiki/Excluding_a_page_from_an_inline_query
>
> or go to the penultimate version of that page
>
> http://smw.referata.com/w/index.php?title=Excluding_a_page_from_an_inline_query&diff=prev&oldid=8012
> (an anonymous user removed some info, such as the link to the roadmap
> about 'Introduce an Operator to Negate Queries', but I don't know if the
> edit was legit)
>
> Cav
>
> > Date: Fri, 7 Nov 2014 18:31:51 -0800
> > From: [hidden email]
> > To: [hidden email]
> > Subject: [Semediawiki-user] Exclude specific pages from query or
> #Concept?
>
> >
> > Greetings,
> >
> > Novice to SMW, is there a way to exclude specific pages from a query or
> > Concept? That is, without adding a new property to the affected pages..
> >
> > I see there's a select pages feature that works well:
> >
> http://semantic-mediawiki.org/wiki/Help:Selecting_pages#Describing_single_pages
> >
> > Thanks!
> >
> ------------------------------------------------------------------------------
> > _______________________________________________
> > Semediawiki-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>
>
>
------------------------------------------------------------------------------
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Exclude specific pages from query or #Concept?

Stephan Gambke-2
In reply to this post by precht@gmail.com
On 9 November 2014 11:26, [hidden email] <[hidden email]> wrote:
> Number 3 and 4 are obviously incorrect, but just random attempts :)

This might work for you (have not tried):
{{#Concept: [[:+]][[Category:Category_name]] [[Page_name::!Undesired page]] }}

If it does, please consider correcting the example on
smw.referata.com. I do not think, that it ever worked as intended.

See http://semantic-mediawiki.org/wiki/Help:Selecting_pages#Comparators :
"Comparators are special symbols like < or >. They are placed _after_
:: in property conditions."

------------------------------------------------------------------------------
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Exclude specific pages from query or #Concept?

Stephan Gambke-2
Btw, I think you can just drop the [[:+]].

[[:+]][[Category:Category_name]] and [[Category:Category_name]] should
return identical result sets.

On 10 November 2014 12:51, Stephan Gambke <[hidden email]> wrote:

> On 9 November 2014 11:26, [hidden email] <[hidden email]> wrote:
>> Number 3 and 4 are obviously incorrect, but just random attempts :)
>
> This might work for you (have not tried):
> {{#Concept: [[:+]][[Category:Category_name]] [[Page_name::!Undesired page]] }}
>
> If it does, please consider correcting the example on
> smw.referata.com. I do not think, that it ever worked as intended.
>
> See http://semantic-mediawiki.org/wiki/Help:Selecting_pages#Comparators :
> "Comparators are special symbols like < or >. They are placed _after_
> :: in property conditions."

------------------------------------------------------------------------------
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Exclude specific pages from query or #Concept?

precht@gmail.com
In reply to this post by Stephan Gambke-2
I'm afraid moving the exclamation point to [[property  ::! value]] didn't
work. It seems this syntax is explicitly noted (
http://semantic-mediawiki.org/wiki/Help:Selecting_pages#Filtering_Categories_and_Concepts)
as non-functional for excluding pages

And I need the [[:+]] to filter out non-Mainspace pages

Thanks for the suggestion, however

Still seeking the holy grail..

On Mon, Nov 10, 2014 at 3:51 AM, Stephan Gambke <[hidden email]> wrote:

> On 9 November 2014 11:26, [hidden email] <[hidden email]> wrote:
> > Number 3 and 4 are obviously incorrect, but just random attempts :)
>
> This might work for you (have not tried):
> {{#Concept: [[:+]][[Category:Category_name]] [[Page_name::!Undesired
> page]] }}
>
> If it does, please consider correcting the example on
> smw.referata.com. I do not think, that it ever worked as intended.
>
> See http://semantic-mediawiki.org/wiki/Help:Selecting_pages#Comparators :
> "Comparators are special symbols like < or >. They are placed _after_
> :: in property conditions."
>
------------------------------------------------------------------------------
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Exclude specific pages from query or #Concept?

Stephan Gambke-2
The only other idea I have would be to drop the underscores. Well,
unless they actually appear in the page names. Even then it could be
worth to try.
{{#Concept: [[:+]][[Category:Category name]] [[Page name::!Undesired page]] }}


On 10 November 2014 13:26, [hidden email] <[hidden email]> wrote:
> I'm afraid moving the exclamation point to [[property  ::! value]] didn't
> work. It seems this syntax is explicitly noted
> (http://semantic-mediawiki.org/wiki/Help:Selecting_pages#Filtering_Categories_and_Concepts)
> as non-functional for excluding pages

That remark refers to Categories ([[Category:!Foo]]) and Concepts
([[Concept:!Bar]]). You want it for a Property [[Property::!Baz]].


> And I need the [[:+]] to filter out non-Mainspace pages

Sorry, right you are. My bad.

------------------------------------------------------------------------------
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Exclude specific pages from query or #Concept?

Cavila Contrafibularity
Ah, I hadn't noticed that your "!" was in the wrong place. As Stephan pointed out, it should come after the colons.

As for the underscores: if the property is called "Property:Page_name", the underscore should be preserved, but if it's "Property:Page name", then obviously it shouldn't. Likewise, for the property values and category names.

One other thing: if you store a page title as a string of datatype 'Text' through {{PAGENAME}} or {{FULLPAGENAME}}, then you may find that spaces are not actually preserved as such but get converted to their html equivalent. Could that be the issue?

Cav

> From: [hidden email]
> Date: Mon, 10 Nov 2014 13:44:01 +0100
> Subject: Re: [Semediawiki-user] Exclude specific pages from query or #Concept?
> To: [hidden email]
> CC: [hidden email]; [hidden email]
>
> The only other idea I have would be to drop the underscores. Well,
> unless they actually appear in the page names. Even then it could be
> worth to try.
> {{#Concept: [[:+]][[Category:Category name]] [[Page name::!Undesired page]] }}
>
>
> On 10 November 2014 13:26, [hidden email] <[hidden email]> wrote:
> > I'm afraid moving the exclamation point to [[property  ::! value]] didn't
> > work. It seems this syntax is explicitly noted
> > (http://semantic-mediawiki.org/wiki/Help:Selecting_pages#Filtering_Categories_and_Concepts)
> > as non-functional for excluding pages
>
> That remark refers to Categories ([[Category:!Foo]]) and Concepts
> ([[Concept:!Bar]]). You want it for a Property [[Property::!Baz]].
>
>
> > And I need the [[:+]] to filter out non-Mainspace pages
>
> Sorry, right you are. My bad.
     
------------------------------------------------------------------------------
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Exclude specific pages from query or #Concept?

Cavila Contrafibularity
In reply to this post by precht@gmail.com
 >>>> It seems this syntax is explicitly noted (http://semantic-mediawiki.org/wiki/Help:Selecting_pages#Filtering_Categories_and_Concepts) as non-functional for excluding pages

What it means is that you can use it for property/value pairs in an #ask or #concept query but not for concepts or categories, so something like [[!Concept:...]] or [[!Category:...]] will not work as intended.

Cav

Date: Mon, 10 Nov 2014 04:26:25 -0800
Subject: Re: [Semediawiki-user] Exclude specific pages from query or #Concept?
From: [hidden email]
To: [hidden email]
CC: [hidden email]; [hidden email]

I'm afraid moving the exclamation point to [[property  ::! value]] didn't work. It seems this syntax is explicitly noted (http://semantic-mediawiki.org/wiki/Help:Selecting_pages#Filtering_Categories_and_Concepts) as non-functional for excluding pages

And I need the [[:+]] to filter out non-Mainspace pages

Thanks for the suggestion, however

Still seeking the holy grail..

On Mon, Nov 10, 2014 at 3:51 AM, Stephan Gambke <[hidden email]> wrote:
On 9 November 2014 11:26, [hidden email] <[hidden email]> wrote:

> Number 3 and 4 are obviously incorrect, but just random attempts :)



This might work for you (have not tried):

{{#Concept: [[:+]][[Category:Category_name]] [[Page_name::!Undesired page]] }}



If it does, please consider correcting the example on

smw.referata.com. I do not think, that it ever worked as intended.



See http://semantic-mediawiki.org/wiki/Help:Selecting_pages#Comparators :

"Comparators are special symbols like < or >. They are placed _after_

:: in property conditions."


     
------------------------------------------------------------------------------
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Exclude specific pages from query or #Concept?

precht@gmail.com
Thanks, all. It turns out the exclamation point being before the Property,
rather than the Value, was the issue all along (the underscore didn't have
an effect).

The [[Page name::!Undesired page]] worked well, I realized when I tried it
the first time, it excluded all pages from the Concept that did not have
the "Page name" Property defined. Once I defined a few [[Page name::Desired
page1]], [[Page name::Desired page2]], [[Page name::Desired page3]], those
all appeared while "Undesired page" was excluded :)

I've updated the smw.referata.com page, but wonder why folks don't add/edit
these tips into the semantic-mediawiki.org Wiki directly? I would have
never found these tips on referata.com myself as the Main Page contains
barely any content, such that unless one dug through the Categories or
searched for key words directly, they'd never find these examples...


On Mon, Nov 10, 2014 at 5:43 AM, Cavila <[hidden email]>
wrote:

>  >>>> It seems this syntax is explicitly noted (
> http://semantic-mediawiki.org/wiki/Help:Selecting_pages#Filtering_Categories_and_Concepts)
> as non-functional for excluding pages
>
> What it means is that you can use it for property/value pairs in an #ask
> or #concept query but not for concepts or categories, so something like
> [[!Concept:...]] or [[!Category:...]] will not work as intended.
>
> Cav
>
> ------------------------------
> Date: Mon, 10 Nov 2014 04:26:25 -0800
> Subject: Re: [Semediawiki-user] Exclude specific pages from query or
> #Concept?
> From: [hidden email]
> To: [hidden email]
> CC: [hidden email]; [hidden email]
>
>
> I'm afraid moving the exclamation point to [[property  ::! value]] didn't
> work. It seems this syntax is explicitly noted (
> http://semantic-mediawiki.org/wiki/Help:Selecting_pages#Filtering_Categories_and_Concepts)
> as non-functional for excluding pages
>
> And I need the [[:+]] to filter out non-Mainspace pages
>
> Thanks for the suggestion, however
>
> Still seeking the holy grail..
>
> On Mon, Nov 10, 2014 at 3:51 AM, Stephan Gambke <[hidden email]> wrote:
>
> On 9 November 2014 11:26, [hidden email] <[hidden email]> wrote:
> > Number 3 and 4 are obviously incorrect, but just random attempts :)
>
> This might work for you (have not tried):
> {{#Concept: [[:+]][[Category:Category_name]] [[Page_name::!Undesired
> page]] }}
>
> If it does, please consider correcting the example on
> smw.referata.com. I do not think, that it ever worked as intended.
>
> See http://semantic-mediawiki.org/wiki/Help:Selecting_pages#Comparators :
> "Comparators are special symbols like < or >. They are placed _after_
> :: in property conditions."
>
>
>
------------------------------------------------------------------------------
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user