Skip to content

shaaimin/lettusearch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LettuSearch

License Maven Central Javadocs Codecov CircleCI GitHub issues

Java client for RediSearch based on Lettuce

Architecture

LettuSearch implements RediSearch commands using the Command abstraction provided by Lettuce.

Building

$ mvn clean install

Usage

Add LettuSearch to your application dependencies, e.g. with Maven:

<dependency>
	<groupId>com.redislabs</groupId>
	<artifactId>lettusearch</artifactId>
	<version>1.5.3</version>
</dependency>
Java example
RediSearchClient client = RediSearchClient.create("redis://localhost");
StatefulRediSearchConnection<String, String> conn = client.connect(); //(1)
RediSearchCommands<String, String> ft = conn.sync(); //(2)
ft.create("beers", Schema.builder().field(TextField.builder().name("name").build())....build()); //(3)
beers().forEach(b -> ft.add("beers", b.get("id"), 1, b)); //(4)
SearchResults<String, String> results = ft.search("beers", "sculpin"); //(5)
  1. Establish a connection to RediSearch

  2. Use sync, async, or reactive API

  3. Create a RediSearch index

  4. Add documents to the previously created index

  5. Search the index

About

Lettuce-based client for RediSearch https://redisearch.io

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%