Skip to content

polisgo2020/search-akss1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage examples

Before the start you need to set environment variables: LISTEN (default: "localhost:8080") and LOG_LEVEL (default: "info")

For run http search server:

go run main.go server --index idx.json

After the index is readed, and the server starts, we need to send the http GET request with "search" method and "str" query param":

    curl 127.0.0.1:8080/search?q=Author+help
or
    http://127.0.0.1:8080/search?q=Author help


For make reverse index:

go run main.go make --dir 'PATH_TO_FILES_DIR' --index 'OUTPUT.json'

Example: go run main.go make --dir books/backup --index idx.json

For search:

go run main.go -search --str 'STR_TOKENS_TO_FIND' --index 'PATH_TO_REVERSE_IDX.json' 

Example: go run main.go search --str "Author help" --index idx.json

Releases

No releases published

Packages

No packages published