Skip to content

mustfa404/FindyyEngine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Mini Search Engine

A simple desktop search engine built with Python, Tkinter, and Whoosh. This application indexes local files and allows users to search through their contents using full-text search.


Full Source Code

import os, sys, json, csv, datetime
import tkinter as tk
from tkinter import ttk, filedialog, messagebox

from whoosh import index, qparser
from whoosh.fields import Schema, TEXT, ID, DATETIME
from whoosh.analysis import StemmingAnalyzer
from whoosh.highlight import Highlighter, HtmlFormatter, ContextFragmenter
from whoosh.qparser import QueryParser, MultifieldParser
from whoosh.query import DateRange, Every, Term
import whoosh.index as windex

try:
    from pypdf import PdfReader
    HAS_PDF = True
except ImportError:
    HAS_PDF = False

try:
    import openpyxl
    HAS_XLSX = True
except ImportError:
    HAS_XLSX = False

INDEX_DIR = os.path.join(os.path.expanduser("~"), ".mini_search_index")
RESULTS_PER_PAGE = 5

SCHEMA = Schema(
    path     = ID(stored=True, unique=True),
    filename = TEXT(stored=True),
    filetype = ID(stored=True),
    content  = TEXT(stored=True, analyzer=StemmingAnalyzer()),
    modified = DATETIME(stored=True),
)

Features

  • Index local folders
  • Full-text search using Whoosh
  • Search inside:
    • TXT files
    • PDF files
    • JSON files
    • CSV files
    • XLSX files
  • Keyword highlighting
  • File type filtering
  • Date filtering
  • Pagination for results
  • Index statistics window
  • Simple Tkinter GUI

Requirements

Install required packages:

pip install whoosh pypdf openpyxl

How to Run

python app.py

Replace app.py with your actual filename.


How It Works

  1. Choose a folder containing files
  2. Select file formats to index
  3. Click Build Index
  4. Enter a search query
  5. Browse paginated results

The search index is stored locally at:

~/.mini_search_index

Supported File Types

Extension Description
.txt Text files
.pdf PDF documents
.json JSON files
.csv CSV spreadsheets
.xlsx Excel workbooks

Search Features

The engine supports:

  • Fuzzy search
  • Wildcards
  • Filename search
  • Content search
  • File type filtering
  • Date range filtering

Example Searches

machine learning
report*
python~1
invoice

Project Structure

project/
│
├── app.py
├── README.md

Notes

  • Hidden folders are skipped during indexing
  • Invalid or unreadable files are ignored safely
  • PDF and XLSX support are optional depending on installed packages

Technologies Used

  • Python
  • Tkinter
  • Whoosh
  • PyPDF
  • OpenPyXL

License

This project is open-source and free to use.

About

A simple desktop search engine built with Python, Tkinter, and Whoosh. This application indexes LOCAL files and allows users to search through their contents using full-text search

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages