VarunMohan / SearchFileSystem

Perform search based queries on local file systems

Repository from Github https://github.comVarunMohan/SearchFileSystemRepository from Github https://github.comVarunMohan/SearchFileSystem

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.

About

Perform search based queries on local file systems


Languages

Language:C++ 96.2%Language:Python 1.8%Language:HTML 1.8%Language:Makefile 0.2%