This quickstart requires a Cleo distribution of version 1.2.0 or above.
src/examples directory contains a number of classes such as
These example classes demonstrate how to develop and configure applications to perform
generic or network typeahead search.
This example shows how to configure Cleo to perform typeahead search over companies in absence of social network. It provides a reference implementation for generic typeahead search over relatively large data sets. It can be adapted to support varying domains such as companies, groups, magazines and so on.
This example shows how to configure Cleo to perform typeahead search over the social network of friends.
The cleo-primer package provides a basic RESTful implementation of partial, out-of-order and real-time typeahead and autocomplete services.
You can follow the steps below to set up a typeahead service for public companies listed at Nasdaq.
- Download cleo-primer from Github.
- Launch the cleo-primer web application from the cleo-primer folder.
git clone --depth 1 https://github.com/jingwei/cleo-primer.git cleo-primer
MAVEN_OPTS="-Xms1g -Xmx1g" mvn jetty:run \ -Dcleo.instance.name=Company \ -Dcleo.instance.type=cleo.primer.GenericTypeaheadInstance \ -Dcleo.instance.conf=src/main/resources/config/generic-typeahead
You can customize the web application by choosing different values for
cleo.instance.conf. Depending on the size of your data sets, you may need to specify a different JVM heap size.
Companybecause we are building a typeahead service for companies listed at Nasdaq.
cleo.instance.typespecifies a Java class
cleo.primer.GenericTypeaheadInstancethat instantiates an instance of Generic Typeahead. This is the only instance type supported by cleo-primer at the present time. We will add more in the coming future.
cleo.instance.confspecifies a file directory where several generic typeahead configuration files are located. For more information on configuring Generic Typeahead and Network Typeahead, please refer to the code examples listed above.
If you have a different type of elements such as schools and publications, you need to prepare your XML file according to cleo.primer.rest.model.ElementDTO