MinimServer Forum

Full Version: tagOptions property: ignore.sort
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
My tagOptions property contains the following

all.ignore.sort={The,A,An,Der,Die,Das,Ein,Eine,Le,La,L',Les,Un,Une,Il,El,",'}

This works except for the final two items. Is there any way of preventing MinimServer from sorting on quotation marks? In the same vein, it would also be useful if sorting on numerical characters could be disabled.

David
You can use the tagValue value.sort option to create a custom sort value for any tag value. See this section for details.
(26-01-2017 13:28)simoncn Wrote: [ -> ]You can use the tagValue value.sort option to create a custom sort value for any tag value. See this section for details.

Thanks, Simon. I was aware of the section, but am still not clear why the quotes still appear in the index, when they are included in the "ignore.sort" statement. Do "ignore.sort' strings have to have white space around them to be ignored in the sorting process?

David
(26-01-2017 18:47)DavidHB Wrote: [ -> ]Thanks, Simon. I was aware of the section, but am still not clear why the quotes still appear in the index, when they are included in the "ignore.sort" statement. Do "ignore.sort' strings have to have white space around them to be ignored in the sorting process?

Yes, this is how it works at present. It is a simple approach that works for most prefixes. Trying to support an extended range of sort customizations via the prefix mechanism (including different rules for some special characters) would be more complex to implement and explain. It would also require the invention of new syntax to deal with the case of numerical characters, which you have requested. Given that the value.sort mechanism can be used to cater for any exceptional situation, I am not convinced that adding complexity to the prefix mechanism would be a good idea.
(26-01-2017 20:06)simoncn Wrote: [ -> ]
(26-01-2017 18:47)DavidHB Wrote: [ -> ]Thanks, Simon. I was aware of the section, but am still not clear why the quotes still appear in the index, when they are included in the "ignore.sort" statement. Do "ignore.sort' strings have to have white space around them to be ignored in the sorting process?

Yes, this is how it works at present. It is a simple approach that works for most prefixes. Trying to support an extended range of sort customizations via the prefix mechanism (including different rules for some special characters) would be more complex to implement and explain. It would also require the invention of new syntax to deal with the case of numerical characters, which you have requested. Given that the value.sort mechanism can be used to cater for any exceptional situation, I am not convinced that adding complexity to the prefix mechanism would be a good idea.

I see the point. Clearly, I need to get my head round value.sort.

David
Well, after a few days puzzling over the various references in the User Guide and a few tests, I confess to being none the wiser. Except that I think that I can define the problem rather better.

I hope we'd agree that a core use case for ignore.sort is to prevent definite and indefinite articles being indexed. This works pretty well for, say, English and German, where articles are normally whole words, surrounded by white space. It doesn't work for languages where the words are sometimes elided (typically with an apostrophe) into their associated noun. So, in a list of Vivaldi's works, L'estro armonico would be indexed under L, while Le quattro stagioni would be found under Q. This somewhat reduces the usefulness of ignore.sort.

Unless I have misunderstood things (which is certainly possible), there is no way to get round this issue using value.sort, and things would get a bit complicated in any case if every ignore.sort had to have a corresponding value.sort. I do take the point about not allowing the syntax to become too complex. But would it be possible to change the rule, so that the specified ignore string, instead of having to be surrounded by white space, simply has to be at the start of the tag value? This would implement the core use case correctly in a wider range of instances.

David
The change you have suggested would sort Land of Hope and Glory under N (probably not desirable).

To use value.sort to sort a file tagged TITLE=L'estro armonico under E instead of L, do the following:

1) Add the tagValue setting Title.value.sort={TitleSort}
2) Add TitleSort to itemTags
3) Add a tag TITLESORT=estro armonico to the file

You can repeat step 3 for other problem titles and you can use a similar approach for other tags such as ALBUM.
(28-01-2017 17:10)simoncn Wrote: [ -> ]The change you have suggested would sort Land of Hope and Glory under N (probably not desirable).

Indeed. That makes me feel like a Dalek looking up at a staircase. Sad

(28-01-2017 17:10)simoncn Wrote: [ -> ]To use value.sort to sort a file tagged TITLE=L'estro armonico under E instead of L, do the following:

1) Add the tagValue setting Title.value.sort={TitleSort}
2) Add TitleSort to itemTags
3) Add a tag TITLESORT=estro armonico to the file

You can repeat step 3 for other problem titles and you can use a similar approach for other tags such as ALBUM.

Ah. It's the concept of the three step process that defeated me. I can see that this general approach could handle all my odd cases, particularly those that get 'alphagrouped' into '#'. Thanks very much.

Is there any chance that something like your very useful example could find its way into the User Guide? There is already a somewhat similar example for ArtistSort, but the title and wording suggested to me that it was particular to the Artist tag.

David
Just to add to the previous post, lest anyone think that the procedure suggested by Simon is likely to be time consuming, I have now removed some 30 entries (affecting over 150 music tracks and 20+ albums) from the '#' alphagroup of my 'Composition' tag, where they were unlikely to be found. Allowing for diversions, this took me about two hours, using MP3Tag.

David
I will update the User guide to clarify that the approach in the ArtistSort example can be used for other tags as well.

Also, I think it would be worth adding support in ignore.sort for prefixes like L' and D' as these are linguistically equivalent to Le, De, etc. The approach I have in mind is to treat ' specially if it is the last character in the prefix and not require a space after it for a match. There would be no special treatment for any other characters.
Pages: 1 2
Reference URL's