-
-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add entity specific collation support (smw_sort), refs 2065 #2429
Conversation
c77a3f2
to
6a7e1c4
Compare
0912926
to
8361482
Compare
@kghbln Some testing guidelines:
Other specific testing scenarios are available in:
[0] https://www.mediawiki.org/wiki/Manual:$wgCategoryCollation |
I had to run
The output contained:
|
Yes, because |
Thanks for the information. Just wanted to make sure! :) |
@mwjames Another question: The default for |
Well, the default SMW sort mode has been that equally of "identity" therefore it should remain so since we don't want to break existing queries that would otherwise carry a different sort match. If users want to change the setting then of course it is suggested to match both. |
That's what I have guessed. Thanks for confirming! |
refs https://sourceforge.net/p/semediawiki/mailman/message/36448466/
Looking at [0] it shows
|
It goes without saying that once you change one of the variables (such as the ICU version, or type of collation) you have to rerun listed scripts. |
Thank you, I wasn't even aware of an outdated version. Will talk to my hoster to upgrade it and test ist again with a more recent version. |
This PR is made in reference to: #2065, #1386
This PR addresses or contains:
$smwgEntityCollation
) collation mapping for entities.$smwgEntityCollation
should correspond to the$wgCategoryCollation
setting (also in regards to selected argument values), yet it is kept separate to have a better control over changes in regards to the collation, sorting, and display of values.smw_sort
is required that can hold a collated sort value and no longer conflicts with the search and matchsmw_sortkey
field.smw_sortkey
becomes a field that stores a literal value for a search hence it will be renamed in a follow-up to reflect that intention.$smwgEntityCollation
option it is expected that a user applies the same caution as for the standard MediaWiki system with eitherrebuildData.php
orupdateEntityCollation.php
being run immediately post the change to ensure that data are updated and correspond to the setting.$smwgEntityCollation
usesidentity
as default setting and will produce the same sorting results as without this changeExample
Output example of the ID_TABLE with a
$wgCategoryCollation = 'uppercase';
setting.Update
In case the table is updated and data exists but without the
smw_sort
field being present, theupdate.php
orsetupStore.php
will initiate a post processing where the content ofsmw_sortley
is copied once to thesmw_sort
field during the setup. The message will be similar to:Depending on the size of the table, this process may take a moment. Any update on the collation/sort field hereafter has to be done executing the
updateEntityCollation.php
script.The
updateEntityCollation.php
maintenance script will output something like:Technical notes
SMW_SPARQL_QF_COLLATION
(seeDefaultSettings.php
) which allows to replicate collation specific information usingswivt:sort
Collator
is the interface to MediaWiki'sCollation
classTableFieldUpdater
is the sole responsible class to update thesmw_sortkey
andsmw_sort
fieldTableIntegrityExaminer
will copy the content ofsmw_sortkey
once at the timesmw_sort
is added to the schemaTableBuilder::getProcessLog
returns a list of activities occurred during the table update and is used inTableIntegrityExaminer
SortPropertyValueResourceBuilder
now handles the export of_SKEY
resourcesupdateEntityCollation.php
script provides a tool for mass updates on the occasion that the$smwgEntityCollation
setting is changedThis PR includes: