Skip to content

shubhamsrkdev/SearchEngine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SearchEngine

SearchEngine is a simple text search engine built using Apache Lucene. This project demonstrates a basic implementation of text indexing and search functionalities using Java and Lucene. It serves as a starting point for building more advanced search applications.

Table of Contents

Overview

This project is a basic text search engine that leverages Apache Lucene for indexing and searching text data. It indexes sample text files (or any other data you provide) and allows you to perform search queries over the indexed content.

Features

  • Text Indexing: Automatically indexes text files for fast retrieval.
  • Search Capability: Supports searching through indexed content using Lucene’s efficient search algorithms.
  • Java-Based: Built using Java and Maven, making it easy to extend and integrate into other projects.

Prerequisites

  • Java Development Kit (JDK): Version 8 or later.
  • Maven: For building and managing project dependencies.

Installation

  1. Clone the Repository

    Open your terminal and run:

    git clone https://github.com/shubhamsrkdev/SearchEngine.git
    cd SearchEngine
  2. Build the Project

    Use Maven to build the project:

    mvn clean install

    This command compiles the source code and packages the application into a JAR file.

  3. Data Setup

    Ensure that you have the necessary text files in the data directory for indexing. You can replace or add files in this folder as required by your use case.

Usage

After building the project, run the search engine using the main class. For example:

java -cp target/SearchEngine-1.0-SNAPSHOT.jar org.example.Main

Note: Replace org.example.Main with the actual fully qualified name of your main class if it differs.

How It Works

  • Indexing: Upon execution, the application reads files from the data directory and creates an index using Lucene.
  • Searching: Once indexing is complete, you can input search queries. The application will return the matching documents based on your query.

Project Structure

SearchEngine/
├── .idea/                # IDE configuration files (if using IntelliJ IDEA)
├── data/                 # Directory containing text files for indexing
├── src/
│   └── main/
│       └── java/
│           └── org/
│               └── example/    # Java source files (including the main class)
├── .gitignore
├── pom.xml               # Maven configuration file
└── README.md             # Project documentation (this file)

Contributing

Contributions are welcome! If you have ideas for improvements or encounter any issues, please feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

Acknowledgements

  • Apache Lucene for providing the core search library.
  • The open-source community for continuous inspiration and support.

About

This project is a simple text search engine based on Lucene.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages