File tree 3 files changed +5
-6
lines changed
main/java/de/ids_mannheim/korap/response
test/java/de/ids_mannheim/korap/search
3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -2494,11 +2494,11 @@ public JsonNode toJsonNode () {
2494
2494
// Legacy flat field support
2495
2495
String mfs = mf .key ;
2496
2496
String value = this .getFieldValue (mfs );
2497
- if (value != null )
2497
+ if (value != null && ! json . has ( mfs ) )
2498
2498
json .set (mfs , new TextNode (value ));
2499
2499
};
2500
2500
2501
- this .addMessage (0 , "Support for flat field values is eprecated " );
2501
+ this .addMessage (0 , "Support for flat field values is deprecated " );
2502
2502
2503
2503
return json ;
2504
2504
};
Original file line number Diff line number Diff line change @@ -55,11 +55,11 @@ public String toJsonString () {
55
55
// Legacy flat field support
56
56
String mfs = mf .key ;
57
57
String value = this .getFieldValue (mfs );
58
- if (value != null )
58
+ if (value != null && ! json . has ( mfs ) )
59
59
json .set (mfs , new TextNode (value ));
60
60
};
61
61
62
- this .addMessage (0 , "Support for flat field values is eprecated " );
62
+ this .addMessage (0 , "Support for flat field values is deprecated " );
63
63
64
64
65
65
// Match was no match
Original file line number Diff line number Diff line change @@ -151,7 +151,6 @@ public void searchMetaFieldsNew () throws IOException {
151
151
assertEquals ("match-GOE_AGX.00002-p7-8" ,
152
152
res .at ("/matches/0/matchID" ).asText ());
153
153
154
-
155
154
// All fields
156
155
jsonString = getJsonString (getClass ()
157
156
.getResource ("/queries/metas/fields_all.jsonld" ).getFile ());
@@ -213,7 +212,7 @@ public void searchMetaFieldsNew () throws IOException {
213
212
assertEquals ("Goethe: Maximen und Reflexionen, (1827-1842)" ,
214
213
res .at ("/matches/0/docTitle" ).asText ());
215
214
assertEquals ("1827" , res .at ("/matches/0/creationDate" ).asText ());
216
- // assertEquals("372-377", res.at("/matches/0/pages").asText ());
215
+ assertTrue ( res .at ("/matches/0/pages" ).isMissingNode ());
217
216
assertEquals ("match-GOE_AGX.00002-p7-8" ,
218
217
res .at ("/matches/0/matchID" ).asText ());
219
218
You can’t perform that action at this time.
0 commit comments