Item10904: SEARCH back-end fixups

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: JQGridPlugin
Branches:
Reported By: PaulHarvey
Waiting For:
Last Change By: MichaelDaum
Column to property mappings are off

diff --git a/lib/Foswiki/Plugins/JQGridPlugin/SearchConnector.pm b/lib/Foswiki/Plugins/JQGridPlugin/SearchConnector.pm
index ed4eddb..37c264b 100644
--- a/lib/Foswiki/Plugins/JQGridPlugin/SearchConnector.pm
+++ b/lib/Foswiki/Plugins/JQGridPlugin/SearchConnector.pm
@@ -44,17 +44,16 @@ sub new {
 
   # maps column names to accessors to the actual property being displayed
   $this->{propertyMap} = {
-    'Topic' => 'topic',
-    'Modified' => 'modified',
-    'Changed' => 'modified',
-    'By' => 'editby',
-    'Author' => 'editby'
+    'Topic' => 'name',
+    'Modified' => 'info.date',
+    'Changed' => 'info.date',
+    'By' => 'info.author',
+    'Author' => 'info.author'
   };
 
   return $this;
 }
 
-
 =begin TML
 
 ---++ ClassMethod restHandleSearch( $request, $response )
@@ -159,7 +158,7 @@ HERE
   foreach my $columnName (@selectedFields) {
     my $cell = '';
     my $propertyName = $this->column2Property($columnName);
-    if ($propertyName eq 'topic') {
+    if ($propertyName eq 'name') {
       $cell .= '$topic';
     } elsif ($propertyName =~ /^[a-zA-Z_]+$/) { # SMELL: should check if this is a defined formfield consulting the DataForm de
       $cell .= '$formfield(' . $propertyName . ')';

-- PaulHarvey - 20 Jun 2011

TODO: the sort key is named 'topic', but in QuerySearch it's known as 'name', damnit smile

-- PaulHarvey - 20 Jun 2011

There are similar differences in SOLR for fields being sorted against one field but searched by another field, both being processed differently by the analyzer. So not that uncommon, though probably plain inconsistent for SEARCH in this case.

-- MichaelDaum - 20 Jun 2011

Fixed in 2.0

-- MichaelDaum - 12 Sep 2011

ItemTemplate edit

Summary SEARCH back-end fixups
ReportedBy PaulHarvey
Codebase trunk
SVN Range
AppliesTo Extension
Component JQGridPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
Topic revision: r3 - 12 Sep 2011, MichaelDaum
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