Item8501: Strange sorting with FilterPlugin

pencil
Priority: Normal
Current State: No Action Required
Released In:
Target Release: n/a
Applies To: Extension
Component: FilterPlugin
Branches:
Reported By: AndreLichtsteiner
Waiting For: Main.MichaelDaum
Last Change By: AndreLichtsteiner
What are the dependencies, that the following code renders correctly?

%MAKEINDEX{"Anlage;Anlage, Anlage (Beschreibung);AnlageBescreibung, Anlage (Handbuch);AnlageHandbuch" cols="2" split="," header="Demo" pattern="(.*);(.*)" format="[[$2][$1]]"}%

Demo

A

[[][Anlage]]

B

[[][Anlage (Beschreibung)]]

H

[[][Anlage (Handbuch)]]

Why am I asking? So, on our installation the list looks as following:

-- AndreLichtsteiner - 11 Feb 2010

Not a bug. The brackets are used to mark the substring to sort the index. Add explicit brackets to fix accidental sorting when the first element might have brackets for some reason.

Try

%MAKEINDEX{
  "Anlage;(Anlag), AnlageBescreibung;(Anlage (Beschreibung)), AnlageHandbuch;(Anlage (Handbuch))" 
  cols="2" 
  split="," 
  header="Demo"
  pattern="(.*);(.*)"
  format="[[$1][$2]]"
}%

Best practice is to make the first group $1 the topic name by default and then pick the sortable string using brackets.

-- MichaelDaum - 12 Feb 2010

Thanks for the answer. But on our wiki, the brackets remain in the title. Shouldn't the pattern look like following?

  pattern="(.*);\((.*)\)"

Wouldn't it be easier to offer a parameter disabling the some what obscure function of 'brackets/substring order'?

-- AndreLichtsteiner - 16 Feb 2010

ItemTemplate edit

Summary Strange sorting with FilterPlugin
ReportedBy AndreLichtsteiner
Codebase
SVN Range
AppliesTo Extension
Component FilterPlugin
Priority Normal
CurrentState No Action Required
WaitingFor MichaelDaum
Checkins
TargetRelease n/a
ReleasedIn
I Attachment Action Size Date Who Comment
Demo.gifgif Demo.gif manage 3 K 11 Feb 2010 - 16:58 AndreLichtsteiner  
Topic revision: r3 - 16 Feb 2010, AndreLichtsteiner
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy