Skip to content

Commit

Permalink
upgraded to lettusearch 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jruaux committed Sep 16, 2019
1 parent f926049 commit 7dde43b
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 17 deletions.
7 changes: 6 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ plugins {
id 'org.asciidoctor.convert' version '1.5.9.2'
}

repositories {
mavenCentral()
mavenLocal()
}

dependencies {
compile 'org.slf4j:slf4j-api:1.7.26'
compile 'org.slf4j:slf4j-jdk14:1.7.26'
Expand All @@ -14,7 +19,7 @@ dependencies {
compile 'org.springframework.boot:spring-boot-autoconfigure:2.1.6.RELEASE'
compile 'org.springframework:spring-jdbc:5.1.6.RELEASE'
compile 'com.zaxxer:HikariCP:3.2.0'
compile 'com.redislabs:lettusearch:1.5.1'
compile 'com.redislabs:lettusearch:1.6.0'
compile 'org.apache.commons:commons-pool2:2.6.1'
compile 'org.latencyutils:LatencyUtils:2.0.3'
compile 'redis.clients:jedis:3.1.0'
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/redislabs/riot/cli/ImportCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public abstract class ImportCommand extends TransferCommand<Map<String, Object>,
private RedisCommandOptions redis = new RedisCommandOptions();
@ArgGroup(exclusive = false, heading = "RediSearch command options%n")
private RediSearchCommandOptions search = new RediSearchCommandOptions();
@Option(names = { "-p",
@Option(names = {
"--processor" }, description = "SpEL expression to process a field", paramLabel = "<name=expression>")
private Map<String, String> fields;
@Option(names = { "-r",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public class RedisConnectionOptions {

private final Logger log = LoggerFactory.getLogger(RedisConnectionOptions.class);

@Option(names = { "-e",
"--endpoint" }, description = "Redis server address (default: ${DEFAULT-VALUE})", paramLabel = "<host:port>")
@Option(names = { "-s",
"--server" }, description = "Redis server address (default: ${DEFAULT-VALUE})", paramLabel = "<host:port>")
private List<RedisEndpoint> endpoints = Arrays.asList(new RedisEndpoint("localhost:6379"));
@Option(names = "--cluster", description = "Connect to a Redis cluster")
private boolean cluster;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class RedisKeyOptions {

@Option(names = "--key-separator", description = "Redis key separator (default: ${DEFAULT-VALUE})", paramLabel = "<string>")
private String separator = ":";
@Option(names = { "-s", "--keyspace" }, description = "Redis keyspace prefix", paramLabel = "<string>")
@Option(names = { "-p", "--keyspace" }, description = "Redis keyspace prefix", paramLabel = "<string>")
private String keyspace;
@Option(names = { "-k", "--keys" }, arity = "1..*", description = "Key fields", paramLabel = "<names>")
private String[] keys = new String[0];
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/commands/db-import.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$ riot db-import -s dbbeer -k id --driver org.hsqldb.jdbc.JDBCDriver --url jdbc:hsqldb:mem:mymemdb "SELECT * FROM beers"
$ riot db-import -p dbbeer -k id --driver org.hsqldb.jdbc.JDBCDriver --url jdbc:hsqldb:mem:mymemdb "SELECT * FROM beers"
2 changes: 1 addition & 1 deletion src/test/resources/commands/file-import-csv-geo.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$ riot file-import https://raw.githubusercontent.com/jpatokal/openflights/master/data/airports.dat -c geoadd -s airportgeo --members AirportID --geo-lon Longitude --geo-lat Latitude -t csv -f AirportID Name City Country IATA ICAO Latitude Longitude Altitude Timezone DST Tz Type Source
$ riot file-import https://raw.githubusercontent.com/jpatokal/openflights/master/data/airports.dat -c geoadd -p airportgeo --members AirportID --geo-lon Longitude --geo-lat Latitude -t csv -f AirportID Name City Country IATA ICAO Latitude Longitude Altitude Timezone DST Tz Type Source
2 changes: 1 addition & 1 deletion src/test/resources/commands/file-import-csv-hash-date.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$ riot file-import -s event -k Id --header --processor-date-format "MM/dd/yyyy HH:mm:ss a" --processor "EventStartDate=remove('Event Start Date')" --processor "EpochStart=#date.parse(EventStartDate).getTime()" "https://data.lacity.org/api/views/rx9t-fp7k/rows.csv?accessType=DOWNLOAD"
$ riot file-import -p event -k Id --header --processor-date-format "MM/dd/yyyy HH:mm:ss a" --processor "EventStartDate=remove('Event Start Date')" --processor "EpochStart=#date.parse(EventStartDate).getTime()" "https://data.lacity.org/api/views/rx9t-fp7k/rows.csv?accessType=DOWNLOAD"
2 changes: 1 addition & 1 deletion src/test/resources/commands/file-import-csv-hash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$ riot file-import -s beer -k id --header https://git.io/fjxPs
$ riot file-import -p beer -k id --header https://git.io/fjxPs
2 changes: 1 addition & 1 deletion src/test/resources/commands/file-import-json-hash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$ riot file-import -s beer -k id -t json https://git.io/fjxPZ
$ riot file-import -p beer -k id -t json https://git.io/fjxPZ
2 changes: 1 addition & 1 deletion src/test/resources/commands/file-import-laevents.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$ riot file-import "https://data.lacity.org/api/views/rx9t-fp7k/rows.csv?accessType=DOWNLOAD" -c ftadd -i laevents -k Id --header --regex 'Event Location'="\((?<lat>.+),\s+(?<lon>.+)\)" -p location=#geo(lon,lat)
$ riot file-import "https://data.lacity.org/api/views/rx9t-fp7k/rows.csv?accessType=DOWNLOAD" -c ftadd -i laevents -k Id --header --regex 'Event Location'="\((?<lat>.+),\s+(?<lon>.+)\)" --processor location=#geo(lon,lat)
2 changes: 1 addition & 1 deletion src/test/resources/commands/gen-faker-hash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$ riot faker id=index firstName=name.firstName lastName=name.lastName address=address.fullAddress --max 100 -s person -k id
$ riot faker id=index firstName=name.firstName lastName=name.lastName address=address.fullAddress --max 100 -p person -k id
2 changes: 1 addition & 1 deletion src/test/resources/commands/gen-faker-set.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$ riot faker name=gameOfThrones.character --max 10000 -c sadd --members name -s got:characters
$ riot faker name=gameOfThrones.character --max 10000 -c sadd --members name -p got:characters
2 changes: 1 addition & 1 deletion src/test/resources/commands/gen-faker-stream.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$ riot faker id=index category=number.randomDigit -b 50 -m 1000 -c xadd -s teststream -k category
$ riot faker id=index category=number.randomDigit -b 50 -m 1000 -c xadd -p teststream -k category
2 changes: 1 addition & 1 deletion src/test/resources/commands/gen-faker-zset.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$ riot faker ip=number.digits(4) lease=number.digits(2) time=number.digits(5) -b 50 -m 10000 -c zadd -s leases -k ip -f lease --score=time
$ riot faker ip=number.digits(4) lease=number.digits(2) time=number.digits(5) -b 50 -m 10000 -c zadd -p leases -k ip -f lease --score=time
2 changes: 1 addition & 1 deletion src/test/resources/commands/gen-simple.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$ riot gen field1=100 field2=1000 -b 100 --threads 3 -m 10000 -s test -k index
$ riot gen field1=100 field2=1000 -b 100 --threads 3 -m 10000 -p test -k index
2 changes: 1 addition & 1 deletion src/test/resources/commands/redis-import.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$ riot -e localhost:6379 redis-import -e localhost:6379 --scan-keyspace beer --scan-keys id -s beer2 -k id
$ riot -s localhost:6379 redis-import -s localhost:6379 --scan-keyspace beer --scan-keys id -p beer2 -k id

0 comments on commit 7dde43b

Please sign in to comment.