Skip to content

Latest commit

 

History

History
48 lines (39 loc) · 900 Bytes

README.md

File metadata and controls

48 lines (39 loc) · 900 Bytes

autocomp

Auto-complete with Spring Boot

Usage

Auto-complete

Get all words by prefix (Ignore case):
http://localhost:8080/api/v1/autocomp/?prefix=<prefix>

Limit results with max:
http://localhost:8080/api/v1/autocomp/?prefix=<prefix>&max=<max>

Select groupname (Default to 'default'):
http://localhost:8080/api/v1/autocomp/?prefix=<prefix>&groupname=<groupname>

Example

Get countries that start with 'I', and limit to 4 results:
http://localhost:8080/api/v1/autocomp/?prefix=I&groupname=country&max=4

Result:

[
    "Iraq",
    "Italy",
    "India",
    "Israel"
]

The search is case-insensitive, but the original prefix is used in the results:
http://localhost:8080/api/v1/autocomp/?prefix=iSrA&groupname=country

Result:

[
    "iSrAel"
]

Words

Get all known words:
http://localhost:8080/api/v1/word