Skip to content

Commit 9a80fa1

Browse files
committed
feat: added Kibana 8.17.1 integration
1 parent 08f04e5 commit 9a80fa1

File tree

3 files changed

+135
-22
lines changed

3 files changed

+135
-22
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323
- Configured Symfony and PSR-12 coding standards
2424
- Added composer scripts for style checking
2525
- VS Code integration setup
26+
- Monitoring Tools:
27+
- Added Kibana 8.17.1 integration
28+
- Configured health checks for Kibana
29+
- Added Elasticsearch monitoring dashboard
30+
- Integrated with existing Elasticsearch setup
2631

2732
### Changed
2833
- Refactored `ElasticsearchService` to implement `SearchEngineInterface`

README.md

Lines changed: 111 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
# PDF Content Search
22

3-
[![PHP Version](https://img.shields.io/badge/PHP-8.4-blue.svg)](https://www.php.net/)
3+
[![Version](https://img.shields.io/badge/Version-1.1.0-blue.svg)](https://github.com/yourusername/pdf-content-search)
4+
[![PHP Version](https://img.shields.io/badge/PHP-8.3-blue.svg)](https://www.php.net/)
45
[![Symfony Version](https://img.shields.io/badge/Symfony-7.2-green.svg)](https://symfony.com/)
5-
[![Elasticsearch](https://img.shields.io/badge/Elasticsearch-8.12.1-005571.svg)](https://www.elastic.co/)
6+
[![Elasticsearch](https://img.shields.io/badge/Elasticsearch-8.17.1-005571.svg)](https://www.elastic.co/)
7+
[![Kibana](https://img.shields.io/badge/Kibana-8.17.1-005571.svg)](https://www.elastic.co/kibana/)
8+
[![Vue.js](https://img.shields.io/badge/Vue.js-3.5.x-brightgreen.svg)](https://vuejs.org/)
9+
[![Tailwind CSS](https://img.shields.io/badge/Tailwind-3.4.x-38bdf8.svg)](https://tailwindcss.com/)
10+
[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-16-336791.svg)](https://www.postgresql.org/)
11+
[![Node.js](https://img.shields.io/badge/Node.js-22.x-339933.svg)](https://nodejs.org/)
12+
[![Docker](https://img.shields.io/badge/Docker-27.5.1-2496ED.svg)](https://www.docker.com/)
13+
[![PHP-CS-Fixer](https://img.shields.io/badge/PHP--CS--Fixer-3.49-yellow.svg)](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer)
614
[![License: GPL-3.0](https://img.shields.io/badge/License-GPL%203.0-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
715

8-
A Symfony application to search content within PDF files using Elasticsearch.
16+
17+
A Symfony application to search content within PDF files using Elasticsearch and Vue.js.
918

1019
## Table of Contents
1120
- [Description](#description)
@@ -14,24 +23,32 @@ A Symfony application to search content within PDF files using Elasticsearch.
1423
- [Installation](#installation)
1524
- [Docker Setup](#docker-setup)
1625
- [Usage](#usage)
26+
- [Development](#development)
27+
- [Elasticsearch](#elasticsearch)
28+
- [Troubleshooting](#troubleshooting)
1729
- [Contributing](#contributing)
1830
- [License](#license)
1931

2032
## Description
21-
This application allows users to search for content within PDF files using Elasticsearch for efficient text searching and indexing.
33+
This application allows users to search for content within PDF files using Elasticsearch for efficient text searching and indexing, with a modern Vue.js frontend.
2234

2335
## Technologies
24-
- PHP 8.4
25-
- Composer 2.x
36+
- PHP 8.3
2637
- Symfony 7.2
27-
- Docker 27.5.1
28-
- Elasticsearch 8.12.1
38+
- Elasticsearch 8.17.1
39+
- Kibana 8.17.1
40+
- Vue.js 3.5.x
41+
- Tailwind CSS 3.4.x
42+
- Docker 27.5.1 & Docker Compose
43+
- Node.js 22.x
44+
- PostgreSQL 16
2945

3046
## Requirements
31-
- Docker and Docker Compose
32-
- PHP 8.4 or higher
47+
- Docker 27.5.1 and Docker Compose
48+
- PHP 8.3
3349
- Composer 2.x
34-
- pdftotext utility
50+
- Node.js 22.x and npm
51+
- pdftotext utility (poppler-utils)
3552

3653
## Installation
3754
1. Clone the repository:
@@ -43,13 +60,19 @@ cd pdf-content-search
4360
2. Install dependencies:
4461
```bash
4562
composer install
63+
npm install
4664
```
4765

4866
3. Install pdftotext utility:
4967
```bash
5068
sudo apt-get install poppler-utils
5169
```
5270

71+
4. Build frontend assets:
72+
```bash
73+
npm run dev
74+
```
75+
5376
## Docker Setup
5477
1. Build and start the containers:
5578
```bash
@@ -61,36 +84,102 @@ docker compose up -d --build
6184
docker compose ps
6285
```
6386

87+
3. Access services:
88+
- Application: http://localhost
89+
- Elasticsearch: http://localhost:9200
90+
- Kibana: http://localhost:5601
91+
6492
## Usage
6593
1. Ensure you have PDF files in the `var/pdfs/` directory
6694

67-
2. Index the PDF files using the command:
95+
2. Index the PDF files:
6896
```bash
69-
php bin/console app:index-pdfs
97+
docker compose exec php bin/console app:index-pdfs
7098
```
7199

72-
3. Access the application at `http://localhost:8080`
100+
3. Access the application at `http://localhost`
73101

74-
4. Search functionalities:
75-
- Simple text search
76-
- Advanced filters
77-
- Date range filtering
102+
4. Search Features:
103+
- Full-text search across PDF contents
104+
- Real-time search results
78105
- Content highlighting
106+
- Relevance scoring
107+
- Document metadata display
108+
- Fuzzy matching for typo tolerance
79109

80110
## Development
81-
1. Start the development server:
111+
1. Start the development environment:
82112
```bash
83-
symfony serve -d
113+
docker compose up -d
114+
npm run watch
84115
```
85116

86117
2. Run tests:
87118
```bash
88-
php bin/phpunit
119+
docker compose exec php bin/phpunit
89120
```
90121

91122
3. Check code style:
92123
```bash
93-
php-cs-fixer fix --dry-run
124+
# Check for violations without fixing
125+
docker compose exec php vendor/bin/php-cs-fixer fix --dry-run
126+
127+
# Check with detailed diff output
128+
docker compose exec php vendor/bin/php-cs-fixer fix --dry-run --diff
129+
130+
# Fix code style violations
131+
docker compose exec php vendor/bin/php-cs-fixer fix
132+
```
133+
134+
4. Frontend Development:
135+
- Components in `assets/components/`
136+
- Styles in `assets/css/`
137+
- Build: `npm run build`
138+
- Watch: `npm run watch`
139+
140+
## Elasticsearch
141+
1. Check cluster health:
142+
```bash
143+
curl http://localhost:9200/_cluster/health
144+
```
145+
146+
2. View indices:
147+
```bash
148+
curl http://localhost:9200/_cat/indices
149+
```
150+
151+
3. Monitor with Kibana:
152+
- Access Kibana at http://localhost:5601
153+
- View index management
154+
- Monitor cluster health
155+
- Analyze search performance
156+
157+
## Troubleshooting
158+
1. Elasticsearch Issues:
159+
```bash
160+
# Check cluster health
161+
docker compose exec elasticsearch curl -X GET "localhost:9200/_cluster/health"
162+
163+
# View logs
164+
docker compose logs elasticsearch
165+
```
166+
167+
2. Frontend Issues:
168+
```bash
169+
# Clear npm cache
170+
npm cache clean --force
171+
172+
# Rebuild assets
173+
npm run build
174+
```
175+
176+
3. PDF Indexing Issues:
177+
```bash
178+
# Check PDF directory
179+
ls var/pdfs/
180+
181+
# Run indexer in verbose mode
182+
docker compose exec php bin/console app:index-pdfs -vv
94183
```
95184

96185
## Contributing

compose.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,25 @@ services:
7575
timeout: 10s
7676
retries: 3
7777

78+
kibana:
79+
image: docker.elastic.co/kibana/kibana:8.17.1
80+
environment:
81+
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
82+
- ELASTICSEARCH_URL=http://elasticsearch:9200
83+
- XPACK_SECURITY_ENABLED=false
84+
ports:
85+
- "5601:5601"
86+
depends_on:
87+
elasticsearch:
88+
condition: service_healthy
89+
networks:
90+
- app_network
91+
healthcheck:
92+
test: ["CMD-SHELL", "curl -s http://localhost:5601/api/status | grep -q 'Looking good'"]
93+
interval: 10s
94+
timeout: 10s
95+
retries: 120
96+
7897
volumes:
7998
elasticsearch_data:
8099
driver: local

0 commit comments

Comments
 (0)