This is a simple example using the Jina neural search framework. And this is from alex's link. This is a repository created to modify docker files and indexes to reflect my project.
Data set used: 17K Mobile Strategy Games dataset from kaggle
git clone https://github.com/msh1273/jina-Appstore-search.git
cd jina-Appstore-search
We wouldn't want our project clashing with our system libraries, now would we?
virtualenv env --python=python3.8 # Python versions >= 3.7 work fine
source env/bin/activate
python get_data.py
This command creates a directory called data
and downloads the 17K Mobile Strategy Games dataset into it. It then shuffles it to ensure we get a diverse range of apps to search through.
💡 Tip: We shuffle using a fixed random seed of 42
, so every shuffle will be the same. Want a different shuffle? Change it in backend_config.py
Make sure you're in your virtual environment first!
pip install -r requirements.txt
python app.py -t index -n 1000
💡 Tip: Use -n
to specify number of apps to index
app.py
accepts an input query via a REST gateway:
python app.py -t query_restful
curl --request POST -d '{"top_k":15,"mode":"search","data":["hello world"]}' -H 'Content-Type: application/json' 'https://main-jina-appstore-search-msh1273.endpoint.ainize.ai/search'
Where hello world
is your query.
Results may not be accurate as the number of documents currently indexed in the workspace is 3000 lines. For more accurate results, increase the number of documents to be indexed!
It contains a lot of metadata, including (working) links to icons. I want to build a nice front-end to show off the search experience so graphical assets are vital. Plus stuff like ratings, descriptions, the works.
This is just a demo search engine. It has no functionality beyond that.
Edit backend/backend_config.py
Currently the part for top_k cannot be specified in the query. (fixed at 15)