r13750 - in search_server/trunk/servlet/src: main/java/org/musicbrainz/search/servlet/mmd2 main/resources test/java/org/musicbrainz/search/servlet

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

r13750 - in search_server/trunk/servlet/src: main/java/org/musicbrainz/search/servlet/mmd2 main/resources test/java/org/musicbrainz/search/servlet

root-9
Author: ijabz
Date: 2014-04-29 08:57:46 +0000 (Tue, 29 Apr 2014)
New Revision: 13750

Modified:
   search_server/trunk/servlet/src/main/java/org/musicbrainz/search/servlet/mmd2/EditorWriter.java
   search_server/trunk/servlet/src/main/resources/oxml.xml
   search_server/trunk/servlet/src/test/java/org/musicbrainz/search/servlet/FindEditorTest.java
Log:
SEARCH-265:Fix editors json output

Modified: search_server/trunk/servlet/src/main/java/org/musicbrainz/search/servlet/mmd2/EditorWriter.java
===================================================================
--- search_server/trunk/servlet/src/main/java/org/musicbrainz/search/servlet/mmd2/EditorWriter.java 2014-04-28 21:37:36 UTC (rev 13749)
+++ search_server/trunk/servlet/src/main/java/org/musicbrainz/search/servlet/mmd2/EditorWriter.java 2014-04-29 08:57:46 UTC (rev 13750)
@@ -82,7 +82,7 @@
     public void write(List list, Result result) throws IOException {
         MbDocument doc = result.getDoc();
         Editor editor = (Editor) MMDSerializer.unserialize(doc.get(EditorIndexField.EDITOR_STORE), Editor.class);
-        //editor.setScore(String.valueOf(result.getNormalizedScore()));
+        editor.setScore(String.valueOf(result.getNormalizedScore()));
         list.add(editor);
     }
 }
\ No newline at end of file

Modified: search_server/trunk/servlet/src/main/resources/oxml.xml
===================================================================
--- search_server/trunk/servlet/src/main/resources/oxml.xml 2014-04-28 21:37:36 UTC (rev 13749)
+++ search_server/trunk/servlet/src/main/resources/oxml.xml 2014-04-29 08:57:46 UTC (rev 13750)
@@ -163,6 +163,11 @@
                 <xml-element java-attribute="aliasList" xml-path="."/>
             </java-attributes>
         </java-type>
+        <java-type name="Instrument">
+            <java-attributes>
+                <xml-element java-attribute="aliasList" xml-path="."/>
+            </java-attributes>
+        </java-type>
         <java-type name="Series">
             <java-attributes>
                 <xml-element java-attribute="aliasList" xml-path="."/>
@@ -398,7 +403,7 @@
                 <xml-element java-attribute="attributeList" xml-path="."/>
             </java-attributes>
         </java-type>
-        <java-type name="AttributeList">
+        <java-type name="Relation$AttributeList">
             <java-attributes>
                 <xml-element java-attribute="attribute" name="attributes"/>
             </java-attributes>

Modified: search_server/trunk/servlet/src/test/java/org/musicbrainz/search/servlet/FindEditorTest.java
===================================================================
--- search_server/trunk/servlet/src/test/java/org/musicbrainz/search/servlet/FindEditorTest.java 2014-04-28 21:37:36 UTC (rev 13749)
+++ search_server/trunk/servlet/src/test/java/org/musicbrainz/search/servlet/FindEditorTest.java 2014-04-29 08:57:46 UTC (rev 13750)
@@ -162,7 +162,7 @@
         String output = sw.toString();
         System.out.println("Json New is" + output);
 
-//TODO        assertTrue(output.contains("\"editor\""));
+        assertTrue(output.contains("\"editors\""));
         assertTrue(output.contains("name\":\"fred\""));
         assertTrue(output.contains("\"count\":1"));
         assertTrue(output.contains("\"offset\":0,"));


_______________________________________________
MusicBrainz-commits mailing list
[hidden email]
http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-commits
Loading...