Skip to content

jiahaoliu1891/Conjunctive-Inverted-Index

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conjunctive Inverted Index

This repository contains two minimal, well-tested implementations for multi-term search over documents:

  • src/inverted_index.py: a classic inverted index with set intersections for AND queries.
  • src/conjunctive_index_binary.py: a binary-encoded variant that treats each document’s term set as a bitmask and answers conjunctive (AND) queries via bitwise checks.

The goal is to show simple, clear baselines for conjunctive (multi-term) search and highlight trade-offs between straightforward posting-list intersections and compact bitmask-based filtering.

Article

For background and motivation, see the article:

Installation

Requirements:

  • Python 3.8+

Install dev dependency for tests:

pip install -r requirements.txt

Tests

This repo is test-first. Run the full test suite with:

pytest -q

Relevant tests:

  • tests/test_inverted_index.py
  • tests/test_conjunctive_index_binary.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages