This application is a full text food search engine using Elasticsearch
and Flask
application.
Source code for ITCS414 search engine project at Faculty of ICT, Mahidol University.
- 6488004 Kittipich Aiumbhornsin
- 6488089 Pattaravit Suksri
- 6488092 Thanaphat Sumrith
- Make sure your system has Python3 and Elastic installed.
- Navigate to the application directory and open it on the terminal.
- Run the local Elastic server on port
9200
. - Edit the file named
elasticsearch_loader.py
as following instructed:- Comment out
line 7
. - Assign your Elasticsearch password to the variable at
line 9
.
- Comment out
- On the terminal, run
python elasticsearch_loader.py --file food.json --index food
.- Please note that you might repeat this step multiple times as the amount of the
.json
index files in the directory.
- Please note that you might repeat this step multiple times as the amount of the
- Create the virtual environment and activate it or install the dependencies directly.
- To install the dependencies, run the following command on the terminal:
pip install -r requirements.txt
. - Edit the file named
__init__.py
as by assign your Elasticsearch password atline 8
. - On the terminal, run
python main.py
.- Please note that by default the application will attempt to run using production setting and the application might ran just a second, to disable this (change to development setting), edit the file named
main.py
as instructed below:- Uncomment
line 12
. - Comment out
line 13
.
- Uncomment
- Please note that by default the application will attempt to run using production setting and the application might ran just a second, to disable this (change to development setting), edit the file named
- Open your browser, paste the following url and click go (enter):
127.0.0.1:5500
. - Explore the amazing application!
/
: This path is going to be redirected to/search
path/search
: Home page of the application; show search box/results
: The path for query and will return the search results to user, if no match return not found result/result/lookup/<int:id>
: The path for specific search result; show the whole information for particular result where<id>
is the reference to the particular document[other path]
: Should return 404 not found page
last updated: Nov 20, 2023 at 00:59 by Kittipich