Wiki Go is a search engine that enables users to find articles and other information using various filters and advanced search functionalities. Developed as part of the Introduction to ElasticSearch at Universidade Federal de Alfenas, this project demonstrates the power of ElasticSearch in combination with modern web development frameworks.
- Overview
- Technologies Used
- User Interface
- Usage
- Project Structure
- API Endpoints
- Examples of Queries
- Contributors
Wiki Go provides an intuitive interface for searching and retrieving content efficiently. Leveraging ElasticSearch, the project highlights:
- Fast and scalable search capabilities.
- Integration of keyword highlighting and advanced filtering.
- A seamless experience between the backend (Java) and the frontend (React).
This project was created to demonstrate proficiency in ElasticSearch and full-stack development.
- ElasticSearch: For storing and indexing data.
- Java: Backend development with Spring Boot.
- React: Frontend development with a responsive design.
- Axios: For managing HTTP requests between the frontend and backend.
- HTML/CSS/JavaScript: Core web technologies for UI implementation.
WikiGo home page
The Wiki Go search engine provides a user-friendly interface to search and filter articles. Users can:
- Input keywords in the search bar.
- Apply filters such as publication date, category, and tags.
- View highlighted keywords in search results for better readability.
The project is organized as follows:
-
backend/
: Contains the Java Spring Boot application that interacts with ElasticSearch.- Controllers: Handle incoming HTTP requests.
- Services: Contain business logic.
- Repositories: Define ElasticSearch queries.
-
frontend_wikigo-main/
: Contains the React application for the user interface.- Components: Modular UI elements.
- Pages: Define the layout of key pages like the search and result pages.
The backend runs on /api
by default.
- GET
/search
- Description: Retrieves search results based on query parameters.
- Query Parameters:
query
: The search keyword(s).page
: Page number to be returned.filters
: Optional filters (e.g., category, date).
- Example:
curl -X GET "http://localhost:8080/api/search?query=exampleQuery&page=1&filter=filter1&filter=filter2"
GET "http://localhost/api/search?query=machine+learning&page=2"
Response:
[
{
"abs": "Machine Learning Article 1 example.",
"title": "Machine Learning introduction",
"url": "https://example.com/machine-learning-introduction"
},
{
"abs": "Machine Learning Article 2 example.",
"title": "Machine is Learning",
"url": "https://example.com/machine-is-learning"
}
]
Executes a basic search query without applying any filters.
Endpoint: /search
Description: Retrieves results based on the provided query string.
- Example:
GET /api/search?query=example&page=1
Searches with all terms required in the content.
Endpoint: /search
Description: Uses the AND
operator to ensure all terms match.
- Example:
GET /api/search?query=example&filter=and&page=1
Filters out results containing specific terms.
Endpoint: /search
Description: Excludes content that matches the specified terms.
- Example:
GET /api/search?query=example&filter=must_not:excluded_term&page=1
Filters results based on a range of creation dates.
Endpoint: /search
Description: Use comparison operators (lt
, gte
) with a date.
-
Parameters:
lt
: Less thangte
: Greater than or equal to
-
Example:
GET /api/search?query=example&filter=dt_creation:lt:2023-01-01&page=1 GET /api/search?query=example&filter=dt_creation:gte:2023-01-01&page=1
Filters results based on the reading time of the content.
Endpoint: /search
Description: Filters based on a range of reading times using lt
or gte
.
-
Parameters:
lt
: Less thangte
: Greater than or equal to
-
Example:
GET /api/search?query=example&filter=reading_time:lt:10&page=1 GET /api/search?query=example&filter=reading_time:gte:5&page=1
Executes a fuzzy search to find matches with slight variations.
Endpoint: /search
Description: Allows minor differences in the query, such as typos.
- Example:
GET /api/search?query=exmple&filter=fuzziness:2&page=1
All searches support highlighting of matched content. By default, results include highlighted terms enclosed in <strong>
tags.
Example Response:
[
{
"abs": "This is a <strong>highlighted</strong> result.",
"title": "Highlighted Title",
"url": "https://example.com/result"
}
]
Giovana Nogueira backend |
Lucas Dogo frontend |