Giter Site home page Giter Site logo

jinnjarburger / simple-search-engine Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 2.0 13 KB

A simple fast search engine written in java with the help of the Collection API which takes in multiple queries and outputs results accordingly.

License: MIT License

Java 100.00%

simple-search-engine's Introduction

Simple-Search-Engine

About the project

A simple fast search engine written in java with the help of the Collection API which takes in multiple queries and outputs results accordingly.

How it works

This search engine implements inverted index by mapping each words to their respective locations in the database. Upon running the program a user menu will prompt asking the user "1. Find a person", "2. Print all people" and "0. Exit". The first option helps users find a person (or any specific object based on the type of database being used) based on 3 search stratigies "ALL", "ANY" and "NONE" respectively. The second option prints all the content of the database. Lastly the third option, you guessed it, exits the program.

Search stratigies

As mentioned before there are three search stratigies "ALL", "ANY" and "NONE". "ALL" takes certain words as input and searches the database for a line which contains all the contents from the input, for instance: if the input is "ERICK HARRINGTON" then it will search for content which contains both "ERICK" && "HARRINGTON" (case insensitive). "ANY" searched for a line which contains any of the contents from the input, for instance: if the input is "Erick Harrington" then it will serach for content which contains either "Erick" || "Harrington". "NONE" makes sure it returns all the contents of the database excluding the contents of the input.

Note

The program takes command line argument for the location of the file/database used (at index 1 -> args[1]), if required the program can be modified to take files directly from the main class by uncommenting the line of code directly below the line "Scanner sc = new Scanner(new File(args[1]))" and mentioning the file path. Use java version 13 or greater as the enchanced switch statement used demands it.

simple-search-engine's People

Contributors

jinnjarburger avatar

Stargazers

Mustafa Galib avatar konng avatar Noushin Gauhar avatar  avatar Muhammad Anwarul Azim avatar Mohammed Niaz Ul Haque avatar

Watchers

 avatar Mohammed Niaz Ul Haque avatar

simple-search-engine's Issues

uffff. Welldone!

Opening an issue just to let you know you did an outstanding job bhaaaaaaaaa!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.