Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Search indexing vs Database indexing [closed]

I was wondering what the distinction was between the search indexing and database indexing. I am aware that DB indexing uses sorted pointers to actual data and search indexing (for example, using an inverted index) uses a hashtable like structure to map words with the documents that have that word. Indexing means different things in both scenarios. My question is- are both cases truly different? Are DB indexing and search indexing different concepts? I guess I'm just confused by the word "indexing" here. Any clarity on this is appreciated.

like image 900
OckhamsRazor Avatar asked Oct 22 '25 16:10

OckhamsRazor


1 Answers

Database indexing are driven by queries from the targeted application. Usually, you have clear requirements when you design the database and decide which attributes to index. For example, if attribute A is indexed in the DB, then it is for the purpose of accelerating some known, potential query Q (or set of queries) over attribute A.

Web search (or keyword search), on the other hand, are more of free forms. When the search engine indexes a document (web page), it has no prior knowledge about the query. Therefore it needs to try to comprehend the document (by means of natural language processing) and index whatever keywords and phrases that may be of interest.

While search indexing and database indexing share many common techniques, the requirements are different. I/O efficiency and consistency are the top concerns of DB indexing. Whereas indexes for search favor scalability and space efficiency (time efficiency is achieved through distribution and parallelism). Also, search indexing do not need to recall all matching documents; retrieving a few hundred top ranked entries would suffice in most cases.

like image 74
liuyu Avatar answered Oct 25 '25 01:10

liuyu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!