Git Product home page Git Product logo

information-retrieval-querying's Introduction

To compile the source code and generate index dump

Run index.sh file from bin folder with two arguments
	1. File - To be parsed for creating index
	2. Path - To store index dump
	e.g., bash index.sh ~/sample.xml index

Run query.sh to search an index
	This script takes input from standard input with multiple lines
	1. First line gives number of queries
	2. Search query in next lines(given no of queries), each search query can have multiple terms/field specific terms
	3. Fields can be searched as plain text or specific to "title", "body", "catogery"
	
	e.g., printf "2\n b:german\n carmony indiana"|bash query.sh

	4. b:<word> searches for this word in body context, t:carmony<word> searches word in titles, c:<word> searches this word in catogeries 
	5. plain text will be searched in all indexes
	6. Print empty string if no matches found
	7. Empty line is usedto seperate results when multiple queries are passed as input


Implementation:


I  have written own approach which ranks the documents and displays documents based on rank, giving priority in decreasing order of title, infobox, catogeries, body, external links.

1. Inverted File is generated and is sorted according to term, alphabetically.
2. Created Secondary index which saves term and offset of this term in primary index.
3. While searching each term is given to a thread, which makes read operation on index files. This thread finds nearest word in seconday index, extracts possible two offsets in which term could be. THis is done using binary search on secondary index. 
4. Term is search in b/w offsets and final posting is loaded into cache.
5. After retrieving postings, I am using my own defined ranking appraoch and displaying top ten documents.
6. Able to handle titles and single words more efficiently.


Thanks,
Spandan
 


information-retrieval-querying's People

Contributors

vspandan avatar

Watchers

 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.