Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building a search engine in java [closed]

Tags:

java

I am building a search engine in Java. The search engine should search for the word entered in the textbox in 80 documents and then display the number of matching documents, the number of times that word appearing in each document.

For a start I imported all txt files and created a class Search.

I need to build an index in order to index each word in the 80 documents so that I can develop an algorithm to compare the word entered with the indexed words and return back the results.

Any suggestions for a start would be grateful !!

Regards,

Humam.

like image 987
HShbib Avatar asked Apr 20 '26 21:04

HShbib


2 Answers

Any suggestions for a start would be grateful!

Absolutely - Lucene:

Apache Lucene(TM) is a high-performance, full-featured text search engine library written entirely in Java. It is a technology suitable for nearly any application that requires full-text search, especially cross-platform.

like image 89
Jon Skeet Avatar answered Apr 23 '26 10:04

Jon Skeet


Take a look at the FTS capabilities of SQLite. That should do pretty much what you want.

like image 38
Ted Hopp Avatar answered Apr 23 '26 11:04

Ted Hopp