This project inludes three basic algorithms:
- Boolean retrieval
- Skip list (intersect with skip pointers)
- Positional intersect
First of all, you need to specfiy a path where your documents are kept. You can do this by using the path
flag:
ir-project -path="~/documents/"
Then you need to choose one of the three algorithms by these flags: boolean, skip and positional.
Now let's see how each one works:
ir-project -path="~/documents/" -boolean "term1" "term2" "term3"
Please notice that it only supports AND
query.
ir-project -path="~/documents/" -skip "term1" "term2" "term3"
Please notice that it only supports AND
query.
ir-project -path="~/documents/" -positional -phrase="Information retrieval is exciting"
With positional intersect algorithm, our aim is to be able to search for a whole phrase instead of checking existense of some words in documents. That's why it gives a phrase as an input.