Sirpyerre / solr-with-golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API Search with GO and Apache Solr

Run docker compose for Apache solr

docker-compose up

Upload data to solr

curl 'http://localhost:8983/solr/gettingstarted/update?commit=true' --data-binary @jobs.json -H 'Content-type:application/json'

Delete data

curl -X POST -H 'Content-Type: application/json' \
    'http://localhost:8983/solr/gettingstarted/update?commit=true' \
    -d '{ "delete": {"query":"*:*"} }'

Run project

./run.sh

Get result by title, description, category, salary and location

For example in web browser type: http://localhost/?title=desarrollador

Get facets by field, fields available: title, description, category, salary and location

http://localhost:3000/facet?field=category&title=master

Run test:

go test internal/handlers/* -v

About


Languages

Language:Go 98.8%Language:Shell 1.2%