Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 287 Vote(s) - 3.58 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PHP-based search frameworks

#1
I'm going to make a small site which requires advanced search capabilities. Since reinventing the wheel isn't such a worthwhile activity, I've done a little googling and found there are some PHP based search frameworks, one of which is integrated into Zend framework.

What I would like to have in the framework:

1. Both full-text and catalogue search capabilities
2. Display results sorted by relevance
3. Ability to filter results by category
4. Sorting results by various criteria
5. Fast search
6. Fast insertion not required

Since the site will feature pretty much static content (some text and a product catalogue), I might go with some pre-generated index.

Are there any (free) frameworks that could meet the above requirements? Suggestions, tips and ideas are more than welcome. It'd be great if you could share your experiences implementing a search system.
Reply

#2
You may want to go with a CMS such as [Joomla][1] or [Drupal][2] if the site will have static content only. Both have good search systems. However, search really depends on what sort of content you have. If its simply searching the HTML of the page, that's one thing, but searching the database for a particular model # of a product is another, in which case you need a shopping cart/e-commerce system rather than a CMS.



[1]:

[To see links please register here]

[2]:

[To see links please register here]

Reply

#3
I recently developed a suggestive fulltext search to use with my Zend Framework based web application - I couldn't find any ready-made solution that fit my requirements, so I went all out and developed a simple(fulltext) keyword search mechanism from scratch. I found the following articles helpful:

[To see links please register here]


[To see links please register here]


What I have now is a system that matches items based on a 'text summary' that is generated at the time the item is saved (or updated) in the database. I have a table called kw_search_summary that contains the text summary of each item (script generated), its id and its category id. The 'summary' column is a mysql fulltext index, so I simply MATCH() the summary column AGAINST() a given expression, and display the results by relevancy. The code that builds this query looks a bit like this:

$select = $this->db->select()
->from(array('kwi' => 'kw_search_index'),
array('id','prodcatid','itemid','useradid','summary','relevance' => "match(summary) against($safeExp in boolean mode)"))
->where("match(summary) against($safeExp in boolean mode)")
->order('relevance desc')
->limitPage($currentPage,self::RESULTS_PER_PAGE);

Hope that was at least a bit helpful.
Reply

#4
Have a look at **Omega** (based on Xapian) - [a link to the Xapian project page][1]

You can integrate it cgi-wise. Because it's based on the blindingly fast Xapian it will be one of the fastest options if you set it up correctly. It can do everything you ask for (including relevance for search results, index web server documents (html, pdf, word, excel, sql databases...) do 'stemming' etc...)

Another (also very good option) would off course be [Apache Lucene][2] --> it's this one that is included in the Zend framework you referenced ("Zend Search"). It can do all the same tricks, although i personally prefer Xapian.

**Edit:** be aware that Omega (and Xapian) are GPL whereas Apache Lucene is LGPL if i recall correctly.

[1]:

[To see links please register here]

[2]:

[To see links please register here]

Reply

#5
definitely use [SOLR][1]. Solr uses lucene. this can we useful for a medium/big site....

the good thing is you can request result in php serialized format from solr...

EDIT:

this is what you are looking for, I complete forgot about it: [Lucene Port To PHP by Zend][2]


[1]:

[To see links please register here]

[2]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through