LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-16-2016, 12:50 PM   #1
CincinnatiKid
Member
 
Registered: Jul 2010
Posts: 454

Rep: Reputation: 47
LAMP Web Server - Search Engine


Hello, I have a bunch of plain text files that are in webroot/docs. Can anyone suggest a search engine that is easy to implement that can search for words that are in the text files in a specific directory and return results?

Honestly when I search google, I only come up with Sphider, which I have not been successful with implementing, seems it has a bunch of problems. I also find Sphider derivatives that cost money.

I also tried something called SSEP and for some reason I can't get it to index my text files. Any suggestions would be much appreciated. Thanks.
 
Old 08-16-2016, 02:04 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi

You may try htdig
See this howto to help you configure it to your needs.

Regards
 
Old 08-16-2016, 06:03 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
grep and cat
 
Old 08-16-2016, 06:19 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,669

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
grep, there should be lots of examples but in its simplest form

grep "text to search for" /path/to/files/*
 
Old 08-17-2016, 09:51 AM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Code:
find /path/to/webroot/docs -type f -exec grep -e <keyword0> -e <keyword1> {} \;
 
Old 08-18-2016, 07:09 AM   #6
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
Hello

If it's lots of text and you want the search to be fast, you need something that will index all of it. You will also get a lot of other features, and better sorting of the results.

One such system is htdig, another is Apache Lucene.

https://lucene.apache.org/core/
 
Old 08-27-2016, 05:38 PM   #7
wh33t
Member
 
Registered: Oct 2003
Location: Canada
Posts: 922

Rep: Reputation: 61
Quote:
Originally Posted by CincinnatiKid View Post
Hello, I have a bunch of plain text files that are in webroot/docs. Can anyone suggest a search engine that is easy to implement that can search for words that are in the text files in a specific directory and return results?

Honestly when I search google, I only come up with Sphider, which I have not been successful with implementing, seems it has a bunch of problems. I also find Sphider derivatives that cost money.

I also tried something called SSEP and for some reason I can't get it to index my text files. Any suggestions would be much appreciated. Thanks.
How are you wanting these results returned? Are you offering the results on the web through through Apache? Seeing how you're already using LAMP, it wouldn't take much to write a custom script in PHP that could easily do that searching for you and then spit out a webpage with results.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Completely on OS web search engine? Novatian Linux - Software 5 09-10-2014 03:54 PM
OpenSource Search Web Engine Lantius Linux - General 1 01-28-2010 02:17 PM
Web spider search engine for a website pridefc Linux - Software 1 04-21-2008 10:36 AM
Search engine for for you docs and home web pages caulfiek Linux - Software 5 11-29-2005 08:12 AM
Looking for source code of Web search engine. George2 Programming 3 05-17-2004 09:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration