Getting started - searchbox

Tharanga Thennakoon
2 min readJan 6, 2017

--

searchbox

Hi welcome to searchbox. This is a lightweight search framework built on Redis and written in Java. Its major focus is providing faster full-text search capability for web applications. You can easily integrate searchbox with your existing Spring application.

enable searchbox

You can use Java Objects(POJO) to read-write data from “searchbox”.

Sample Java POJO

@Id annotation is used to mention identity field of the model. Each model has a unique id. @Index annotation is used to mention index fields of the model. Searching performs only for index fields. All of the CRUD operations perform through SearchBoxOperations service.

SearchBoxOperations service

This diagram describes how searchbox stores data in side the Redis.

how searchbox stores data

searchbox mainly use HASH and ZSET data structures of Redis to store data. QueryFunction feature of the searchbox helps for faster querying data. The queries which write inside the QueryFunctions are loading when server boot. Then, each queries are converted in to lua scripts. The converted lua scripts are compiled into Redis server.

how QueryFunctions works

Later, you can retrieve the data according to the Query by calling name of QueryFunction. As an example, you can call it from the Controller

calling QueryFunction by name

searchbox is lightweight and faster solution. Try it and give your valuable comments. Thank You.

github : https://github.com/quebic-source/searchbox-core

--

--