« Issue/2499 » : différence entre les versions

De Semantic MediaWiki - Sandbox
(smw made it into the core interwiki tabel :))
(form, readability)
Balise : Éditeur de wikicode 2017
Ligne 5 : Ligne 5 :
{| class="wikitable"
{| class="wikitable"
! style="width: 33%;" | Query
! style="width: 33%;" | Query
! style="width: 33%;" |Result
! style="width: 33%;" | Result
! Comments
! Comments
|-
|-
|
|
<pre><nowiki>{{#ask: [[Category:2499]] [[Page::some title with a value]]
<pre>
{{#ask:
[[Category:2499]]
[[Page::some title with a value]]
  |?Page
  |?Page
  |format=ul
  |format=ul
}}</nowiki></pre>
}}
</pre>
|
|
{{#ask: [[Category:2499]] [[Page::some title with a value]] |?Page |format=ul }}
{{#ask: [[Category:2499]] [[Page::some title with a value]] |?Page |format=ul }}
Ligne 20 : Ligne 24 :
|-
|-
|
|
<pre><nowiki>{{#ask: [[Category:2499]] [[Page::~some title with a value]]
<pre>
{{#ask:
[[Category:2499]]
[[Page::~some title with a value]]
  |?Page
  |?Page
  |format=ul
  |format=ul
}}</nowiki></pre>
}}
</pre>
|
|
{{#ask: [[Category:2499]] [[Page::~some title with a value]] |?Page |format=ul }}
{{#ask: [[Category:2499]] [[Page::~some title with a value]] |?Page |format=ul }}
Ligne 31 : Ligne 39 :
|-
|-
|
|
<pre><nowiki>{{#ask: [[Category:2499]] [[Page::like:some title with a value]]
<pre>
{{#ask:
[[Category:2499]]
[[Page::like:some title with a value]]
  |?Page
  |?Page
  |format=ul
  |format=ul
}}</nowiki></pre>
}}
</pre>
|
|
{{#ask: [[Category:2499]] [[Page::like:some title with a value]] |?Page |format=ul }}
{{#ask: [[Category:2499]] [[Page::like:some title with a value]] |?Page |format=ul }}
Ligne 45 : Ligne 57 :
{| class="wikitable"
{| class="wikitable"
! style="width: 33%;" | Query
! style="width: 33%;" | Query
! style="width: 33%;" |Result
! style="width: 33%;" | Result
! Comments
! Comments
|-
|-
|
|
<pre><nowiki>{{#ask: [[Category:2499]] [[Text::some title with a value]]
<pre>
{{#ask:
[[Category:2499]]
[[Text::some title with a value]]
  |?Text
  |?Text
  |format=ul
  |format=ul
}}</nowiki></pre>
}}
</pre>
|
|
{{#ask: [[Category:2499]] [[Text::some title with a value]] |?Text |format=ul }}
{{#ask: [[Category:2499]] [[Text::some title with a value]] |?Text |format=ul }}
Ligne 60 : Ligne 76 :
|-
|-
|
|
<pre><nowiki>{{#ask: [[Category:2499]] [[Text::~some title with a value]]
<pre>
{{#ask:
[[Category:2499]]
[[Text::~some title with a value]]
  |?Text
  |?Text
  |format=ul
  |format=ul
}}</nowiki></pre>
}}
</pre>
|
|
{{#ask: [[Category:2499]] [[Text::~some title with a value]] |?Text |format=ul }}
{{#ask: [[Category:2499]] [[Text::~some title with a value]] |?Text |format=ul }}
Ligne 70 : Ligne 90 :
|-
|-
|
|
<pre><nowiki>{{#ask: [[Category:2499]] [[Text::like:some title with a value]]
<pre>
{{#ask:
[[Category:2499]]
[[Text::like:some title with a value]]
  |?Text
  |?Text
  |format=ul
  |format=ul
}}</nowiki></pre>
}}
</pre>
|
|
{{#ask: [[Category:2499]] [[Text::like:some title with a value]] |?Text |format=ul }}
{{#ask: [[Category:2499]] [[Text::like:some title with a value]] |?Text |format=ul }}
Ligne 84 : Ligne 108 :
{| class="wikitable"
{| class="wikitable"
! style="width: 33%;" | Query
! style="width: 33%;" | Query
! style="width: 33%;" |Result
! style="width: 33%;" | Result
! Comments
! Comments
|-
|-
|
|
<pre><nowiki>{{#ask: [[Category:2499]] [[URL::http://example.org/some title with a value]]
<pre>
{{#ask:
[[Category:2499]]
[[URL::http://example.org/some title with a value]]
  |?URL
  |?URL
  |format=ul
  |format=ul
}}</nowiki></pre>
}}
</pre>
|
|
{{#ask: [[Category:2499]] [[URL::http://example.org/some title with a value]] |?URL |format=ul }}
{{#ask: [[Category:2499]] [[URL::http://example.org/some title with a value]] |?URL |format=ul }}
Ligne 97 : Ligne 125 :
|-
|-
|
|
<pre><nowiki>{{#ask: [[Category:2499]] [[URL::~http://example.org/some title with a value]]
<pre>
{{#ask:
[[Category:2499]]
[[URL::~http://example.org/some title with a value]]
  |?URL
  |?URL
  |format=ul
  |format=ul
}}</nowiki></pre>
}}
</pre>
|
|
{{#ask: [[Category:2499]] [[URL::~http://example.org/some title with a value]] |?URL |format=ul }}
{{#ask: [[Category:2499]] [[URL::~http://example.org/some title with a value]] |?URL |format=ul }}
Ligne 106 : Ligne 138 :
|-
|-
|
|
<pre><nowiki>{{#ask: [[Category:2499]] [[URL::like:http://example.org/some title with a value]]
<pre>
{{#ask:
[[Category:2499]]
[[URL::like:http://example.org/some title with a value]]
  |?URL
  |?URL
  |format=ul
  |format=ul
}}</nowiki></pre>
}}
</pre>
|  
|  
{{#ask: [[Category:2499]] [[URL::like:http://example.org/some title with a value]] |?URL |format=ul  }}
{{#ask: [[Category:2499]] [[URL::like:http://example.org/some title with a value]] |?URL |format=ul  }}
Ligne 126 : Ligne 162 :
}}
}}


[[Category:Issue]] __NOTOC__
[[Category:Issue]]  
__NOTOC__

Version du 10 mars 2018 à 22:58

Notes on this page are made in regards to $GLOBALS['smwgFieldTypeFeatures'] = SMW_FIELDT_CHAR_NOCASE | SMW_FIELDT_CHAR_LONG;1

Page

Query Result Comments
{{#ask:
 [[Category:2499]]
 [[Page::some title with a value]]
 |?Page
 |format=ul
}}
  • Doesn't return a valid result because the value is matched against the smw_title field which is not made NOCASE to distinguish between entities like (some vs. Some)
  • Page types (_wpg) are resources that can be linked and referenced therefore matching a distinct entity is required, meaning to match exactly [[Page::some title with a value]]
{{#ask:
 [[Category:2499]]
 [[Page::~some title with a value]]
 |?Page
 |format=ul
}}
  • ~ as match operator is to direct the search towards the smw_sortkey field (a field that is made NOCASE)
  • In case the full-text index is enabled then the search is redirected to the full-text index given that the SMW_FT_WIKIPAGE option is enabled as well
{{#ask:
 [[Category:2499]]
 [[Page::like:some title with a value]]
 |?Page
 |format=ul
}}
  • like: match operator is to direct the search towards the smw_sortkey field which is made NOCASE and independent whether the full-text index is enabled or not

Text

Query Result Comments
{{#ask:
 [[Category:2499]]
 [[Text::some title with a value]]
 |?Text
 |format=ul
}}
  • A text or string is a simple value no resource as in case of a page value therefore is treated with more leniency
  • A standard search will match against any possible NOCASE as well since blob fields are made case insensitive
{{#ask:
 [[Category:2499]]
 [[Text::~some title with a value]]
 |?Text
 |format=ul
}}
  • ~ operator matches the full-text index, if full-text search is enabled otherwise uses the standard blob field
{{#ask:
 [[Category:2499]]
 [[Text::like:some title with a value]]
 |?Text
 |format=ul
}}
  • like: operator matches the standard blob field independent whether the full-text index is enabled or not

URL

Query Result Comments
{{#ask:
 [[Category:2499]]
 [[URL::http://example.org/some title with a value]]
 |?URL
 |format=ul
}}
{{#ask:
 [[Category:2499]]
 [[URL::~http://example.org/some title with a value]]
 |?URL
 |format=ul
}}
{{#ask:
 [[Category:2499]]
 [[URL::like:http://example.org/some title with a value]]
 |?URL
 |format=ul
}}
  • like: operator matches the standard blob field independent from whether the full-text index is enabled or not

See also

Les cookies nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de cookies.