0

I have website and I need to build fast search engine for it. I have to search text in database or files (word, pdf) . I want too when I search a text the result the exact word or a text which have close writing, for example, I type "exemple" the result show "example" or "examples" even if this text is in database or in files(word, pdf). My website is in PHP and I don't work with any framework. Can someone tell me a solution or give me a link tutorial about this. Thanks

tiaana
  • 103
  • 8
  • 1
    Also look at http://sphinxsearch.com/ which is well supported by PHP (http://php.net/manual/en/book.sphinx.php) – Rob G Jun 02 '15 at 08:17
  • Thank you, I'm looking for more information about sphinxsearch and lucene and I shall see the solution which corresponds the most – tiaana Jun 02 '15 at 08:33

1 Answers1

0

There are a bunch of solutions (e.g. do you want to index your files periodically of do you prefer ad hoc searches?). Look up XML parsing and PDF parsing.

SJDS
  • 312
  • 7
  • 19
  • As I'm beginner I don't know what is the best solution, is to index files or ad hoc search – tiaana Jun 02 '15 at 09:09
  • if you want it fast (as per your question) you'll most likely want to index files – Rob G Jun 02 '15 at 09:10
  • I see after searching information that Sphinxsearch can't index directly so I have to import the contents into XML format, can you recomment a method do this – tiaana Jun 02 '15 at 09:57
  • There's a question that perfectly suites your answer! See here: https://stackoverflow.com/questions/486757/how-to-generate-xml-file-dynamically-using-php. – SJDS Jun 02 '15 at 09:59