- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference between Inverted Index and Forward Index
Inverted Index and Forward Index are data structures used to search text in a document or set of documents.
Inverted Index stores the words as index and document name(s) as mapped reference(s).
Forward Index stores the document name as index and word(s) as mapped reference(s).
The following are some of the important differences between the Inverted Index and Forward Index.
|Sr. No.||Key||Inverted Index||Forward Index|
|1||Mapping Pattern||Inverted Index stores the words as index and document name(s) as mapped reference(s).||Forward Index stores the document name as index and word(s) as mapped reference(s).|
|2||Index Building Process|
|3||Indexing||In the Inverted index, indexing is slow as each word has to be checked before preparing the index.||In the forward index, indexing is fast as keywords are appended when found.|
|4||Searching||In the Inverted index, the search is quite fast.||In the forward index, the search is slow.|
Word Documents ------------------------- Welcome doc1 Hello doc1, doc3 Hi doc2 -------------------------
Word Documents ------------------------- doc1 Welcome, Hello doc2 Hi doc3 Hello -------------------------
|6||Duplicity||In the Inverted index, no duplicate keyword is stored in an index.||In the forward index, duplicate keywords can be present in an index like 'Hello'.|
|7||Real-Life Examples||A glossary at end of the index, Reverse Lookup.||Table of Content at the start of the book, DNS lookup.|
- Difference between Cost Performance Index (CPI) and Schedule Performance Index (SPI)
- Difference between clustered index and non-clustered index in SQL server
- Difference Between Clustered and Non-clustered index
- Difference between Forward Engineering and Reverse Engineering
- Difference between Net Present Value (NPV) and Profitability Index (PI)
- Python Pandas - Calculate TimedeltaArray of difference between index values and index converted to PeriodArray at specified freq
- Difference between SHOW INDEX, SHOW INDEXES and SHOW KEYS in MySQL?
- Difference Between Forward and Backward Reasoning in AI\n
- What is the difference between forward contract and futures contract?
- Swap Even Index Elements And Odd Index Elements in Python
- Python Pandas - Return a new Index with elements of index not in other and get the difference
- Maximum absolute difference of value and index sums in C