@@ -351,12 +351,12 @@ public void geoShapeFilterSpherical() throws ParseException {
351
351
final Polygon small = factory .createPolygon (new Coordinate []{new Coordinate (34.9001 , 29.7001 ),
352
352
new Coordinate (34.9001 , 29.7100 ), new Coordinate (34.9100 , 29.7100 ),
353
353
new Coordinate (34.9100 , 29.7001 ), new Coordinate (34.9001 , 29.7001 )});
354
- client .hset ("small" , RediSearchUtil . toStringMap ( Collections . singletonMap ( "geom" , small ) ));
354
+ client .hset ("small" , "geom" , small . toString ( ));
355
355
356
356
final Polygon large = factory .createPolygon (new Coordinate []{new Coordinate (34.9001 , 29.7001 ),
357
357
new Coordinate (34.9001 , 29.7200 ), new Coordinate (34.9200 , 29.7200 ),
358
358
new Coordinate (34.9200 , 29.7001 ), new Coordinate (34.9001 , 29.7001 )});
359
- client .hset ("large" , RediSearchUtil . toStringMap ( Collections . singletonMap ( "geom" , large ) ));
359
+ client .hset ("large" , "geom" , large . toString ( ));
360
360
361
361
// within condition
362
362
final Polygon within = factory .createPolygon (new Coordinate []{new Coordinate (34.9000 , 29.7000 ),
@@ -381,7 +381,7 @@ public void geoShapeFilterSpherical() throws ParseException {
381
381
382
382
// point type
383
383
final Point point = factory .createPoint (new Coordinate (34.9010 , 29.7010 ));
384
- client .hset ("point" , RediSearchUtil . toStringMap ( Collections . singletonMap ( "geom" , point ) ));
384
+ client .hset ("point" , "geom" , point . toString ( ));
385
385
386
386
res = client .ftSearch (index , "@geom:[within $poly]" ,
387
387
FTSearchParams .searchParams ().addParam ("poly" , within ).dialect (3 ));
@@ -399,11 +399,11 @@ public void geoShapeFilterFlat() throws ParseException {
399
399
// polygon type
400
400
final Polygon small = factory .createPolygon (new Coordinate []{new Coordinate (1 , 1 ),
401
401
new Coordinate (1 , 100 ), new Coordinate (100 , 100 ), new Coordinate (100 , 1 ), new Coordinate (1 , 1 )});
402
- client .hset ("small" , RediSearchUtil . toStringMap ( Collections . singletonMap ( "geom" , small ) ));
402
+ client .hset ("small" , "geom" , small . toString ( ));
403
403
404
404
final Polygon large = factory .createPolygon (new Coordinate []{new Coordinate (1 , 1 ),
405
405
new Coordinate (1 , 200 ), new Coordinate (200 , 200 ), new Coordinate (200 , 1 ), new Coordinate (1 , 1 )});
406
- client .hset ("large" , RediSearchUtil . toStringMap ( Collections . singletonMap ( "geom" , large ) ));
406
+ client .hset ("large" , "geom" , large . toString ( ));
407
407
408
408
// within condition
409
409
final Polygon within = factory .createPolygon (new Coordinate []{new Coordinate (0 , 0 ),
@@ -426,7 +426,7 @@ public void geoShapeFilterFlat() throws ParseException {
426
426
427
427
// point type
428
428
final Point point = factory .createPoint (new Coordinate (10 , 10 ));
429
- client .hset ("point" , RediSearchUtil . toStringMap ( Collections . singletonMap ( "geom" , point ) ));
429
+ client .hset ("point" , "geom" , point . toString ( ));
430
430
431
431
res = client .ftSearch (index , "@geom:[within $poly]" ,
432
432
FTSearchParams .searchParams ().addParam ("poly" , within ).dialect (3 ));
@@ -1130,9 +1130,9 @@ public void maxPrefixExpansionSearchProfile() {
1130
1130
client .ftConfigSet (configParam , "2" );
1131
1131
1132
1132
assertOK (client .ftCreate (index , TextField .of ("t" )));
1133
- client .hset ("1" , Collections . singletonMap ( "t" , "foo1" ) );
1134
- client .hset ("2" , Collections . singletonMap ( "t" , "foo2" ) );
1135
- client .hset ("3" , Collections . singletonMap ( "t" , "foo3" ) );
1133
+ client .hset ("1" , "t" , "foo1" );
1134
+ client .hset ("2" , "t" , "foo2" );
1135
+ client .hset ("3" , "t" , "foo3" );
1136
1136
1137
1137
Map .Entry <SearchResult , Map <String , Object >> reply = client .ftProfileSearch (index ,
1138
1138
FTProfileParams .profileParams (), "foo*" , FTSearchParams .searchParams ().limit (0 , 0 ));
@@ -1152,8 +1152,8 @@ public void maxPrefixExpansionSearchProfile() {
1152
1152
@ Test
1153
1153
public void noContentSearchProfile () {
1154
1154
assertOK (client .ftCreate (index , TextField .of ("t" )));
1155
- client .hset ("1" , Collections . singletonMap ( "t" , "foo" ) );
1156
- client .hset ("2" , Collections . singletonMap ( "t" , "bar" ) );
1155
+ client .hset ("1" , "t" , "foo" );
1156
+ client .hset ("2" , "t" , "bar" );
1157
1157
1158
1158
Map .Entry <SearchResult , Map <String , Object >> profile = client .ftProfileSearch (index ,
1159
1159
FTProfileParams .profileParams (), "foo -@t:baz" , FTSearchParams .searchParams ().noContent ());
@@ -1179,8 +1179,8 @@ public void noContentSearchProfile() {
1179
1179
@ Test
1180
1180
public void deepReplySearchProfile () {
1181
1181
assertOK (client .ftCreate (index , TextField .of ("t" )));
1182
- client .hset ("1" , Collections . singletonMap ( "t" , "hello" ) );
1183
- client .hset ("2" , Collections . singletonMap ( "t" , "world" ) );
1182
+ client .hset ("1" , "t" , "hello" );
1183
+ client .hset ("2" , "t" , "world" );
1184
1184
1185
1185
Map .Entry <SearchResult , Map <String , Object >> profile
1186
1186
= client .ftProfileSearch (index , FTProfileParams .profileParams (),
@@ -1217,10 +1217,10 @@ public void deepReplySearchProfile() {
1217
1217
@ Test
1218
1218
public void limitedSearchProfile () {
1219
1219
assertOK (client .ftCreate (index , TextField .of ("t" )));
1220
- client .hset ("1" , Collections . singletonMap ( "t" , "hello" ) );
1221
- client .hset ("2" , Collections . singletonMap ( "t" , "hell" ) );
1222
- client .hset ("3" , Collections . singletonMap ( "t" , "help" ) );
1223
- client .hset ("4" , Collections . singletonMap ( "t" , "helowa" ) );
1220
+ client .hset ("1" , "t" , "hello" );
1221
+ client .hset ("2" , "t" , "hell" );
1222
+ client .hset ("3" , "t" , "help" );
1223
+ client .hset ("4" , "t" , "helowa" );
1224
1224
1225
1225
Map .Entry <SearchResult , Map <String , Object >> profile = client .ftProfileSearch (index ,
1226
1226
FTProfileParams .profileParams ().limited (), "%hell% hel*" , FTSearchParams .searchParams ().noContent ());
0 commit comments