Coder Social home page Coder Social logo

searchfilesystem's Introduction

SearchFileSystem (SFS)

Project allows you to index files in a local directory and then query for them using a different API similar to a search engine.

Setup & Installation

First clone the repository in the directory to be indexed. Then install the below dependencies with the following commands.

boost: brew install boost
flask: pip install flask

Running

First cd to the project directory. Then, run make sfs, followed by python run.py. This will open a web interface with the following two capabilities.

  • Click index to generate an index of the selected directory
  • Ente a search query (E.G: "term1" OR "term2" AND "term3")

The results of the commands are output on the page after processing.

Note that the commands can also be run through the command-line. This method is preferred since the above method is shown to provide slow performance.

  • To index, run project-dir/executables/sfs index
  • To query, run project-dir/executables/sfs query "example_query"

Querying

There is support for PHRASE queries, AND queries, and OR queries. The grammar for the queries are as follows.

  • PHRASE Queries are of the form: "term1 term2"
  • AND Queries are of the form: (query1 AND query2)
  • OR Queries are of the form: (query1 OR query2)

Index Document Selection

The list of subdirectories and documents that are indexed are specified in the direcotry project-dir/lib/utils/DirectoryFileUtils.h . This file can be modified to incorporate other kinds of documents into the index.

searchfilesystem's People

Contributors

varunmohan avatar

Watchers

James Cloos avatar  avatar Max avatar

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.