I am building a search engine. In this regard, I have built a Lucene indexer in Java and also built a web interface in PHP where the user will submit the query. As my search is geo-temporal specific, so by PHP I have tracked the user's current time and location along with the query. Now my question is how will I pass those values from PHP to Lucene search module that is in Java.
In this context I have studied Zend. But it seems that in Zend I have to rewrite the searcher and indexer in Zend Lucene framework that is different from Java Lucene that I have used. I am asking is there any way that I can use to integrate my PHP web interface with Lucene without changing anything to underlying indexer and searcher that I have written in Java Lucene.
So in brief, I want to know how to pass those PHP variables to the underlying Lucene searcher in Java and display the output of the searcher back in PHP web interface. Thank you.
If I understand Zend Search, it is an implementation of Lucene for PHP (Lucene 2.3 in Zend 1 -- don't know which Lucene version for Zend 2). The API is not a straight port, but you can use Zend Search with vanilla Lucene indexes. Google for "Zend 2 search lucene compatibility".
The Zend_Search_Lucene and related classes that were in Zend Framework 1, which are a standalone Lucene implementation and don't depend on any other libraries, have been replaced with ZendSearch, now a git repository. However, the repository doesn't contain any documentation. I assume the Zend Framework 1 documentation for Zend_Search_Lucene applies equally to ZendSearch: http://framework.zend.com/manual/1.12/en/zend.search.lucene.index-creation.html. I don't know why ZendSearch is not part of Zend Framework 2.
Related
I know, there is an Lucene port in zend to get the lucene features in pure PHP.
Is there a way to use that search-code in an non-zend-application, like other PHP frameworks?
Walking through the web I found some very old howto's, but it was not able to apply those old howto to the current releases of zend framework or zend lucene search.
Is there any way to create a faceted search using Zend Lucene?
I'm limited to shared hosting, and I don't have any option to use Solr.
I doubt this is supported in the current version of ZF1-Lucene, you should probably use the standalone SOLR on your server and write your own wrappers on top of SOLR for your use. Before writing your own please visit below links to get some insights on an existing libraries available for PHP/Zend on top of SOLR.
https://stackoverflow.com/q/19751146/765854
https://github.com/bluedaniel/Zend-Service-Solr
We are building a Social Networking website and there are videos, user profiles and other details on the site. The site is developed using Zend Framework. It needs to develop a Site Search Engine feature on this site. It need to index all data in the website and search against that data.
I checked Sphider but it is not easy to use in Zend Framework. And I tried Sphinx but that needs lot of configuration from Terminal. Next I tried is Zend Lucene Component and it works. But I couldn't display the Videos or Profile Image on the result set.
Please suggest an easy but powerful method to build a Custom Search Engine inside website built on Zend Framework.
You should have a look at setting up a Solr search server. It is a Lucene implementation, but scales incredibly well. From my understanding Zend's Lucene implementation, while good for small amounts of data, does not scale well.
There is also a PECL Solr extension for easy access from PHP, regardless of framework.
I have finished writing my own web application now. It is written in PHP with MYSQL DB and I did not use any MVC framework at all. Now I want to add a local search functionality for my app and from looking at the other posts here, Zend_Search_Lucene seems to be a good option for me.
Now if I want to use Zend_Search_Lucene do I have to install the whole Zend framework then re-write my app and adapt them into its MVC framework ?
I am looking to use just the search feature of the framework, and right now I probably do not really mind installing the whole framework, but I surely do if I have to make large-scale changes to my app..
appreciate any answer-suggestion, thx
You can just use the Zend_Search_Lucene package, you don't need to use the whole framework and/or MVC aspect of it. If you don't want to install the whole framework, you have to check package dependencies that Zend_Search_Lucene has. There are some automatic ways of doing this, here are some:
ZF dependency manager
Zend Framework Automatic Dependency Tracking
If you google it you'll sure find more.
For the answer to the question: no, you won't have to change it, you may use Zend Framework libraries independently.
I won't give you any tutorials on Lucene, though.
For class, I would like a to use PHP MVC framework very similar to ASP.NET MVC with NHibernate. I am very comfortable with ASP.NET MVC. I need to use PHP and MySQL. I would not like to be concerned with the SQL to save me time. I would like to just design my PHP model classes and controllers without all of that data-access logic behind it that I would have to write.
Any suggestions? Thanks.
Also, I'm very limited on what I can install on the server. For instance, I can't upgrade PHP or run other installers. I want something I can drop in.
I prefer Zend Framework MVC components combined with Doctrine if really want great power. but for something simple try CaKePHP as it has its own simple ORM implementation, and the framework is built to be the php version of Ruby on Rails.
My personnal preference for "MVC Framework" would probably be Zend Framework -- though it's not the only possible choice (I'm thinking about symfony too, for instance).
About the "not writing SQL" part, I would use Doctrine, which is a great ORM Framework.
It's actually the default ORM Framework of symfony, and can be used with Zend Framework quite easily.
I suggest Symfony. It uses Doctrine (which is inspired partly by Hibernate) too, but it is integrated deeper with Symfony than Zend Framework. Symfony provides a number of helper classes which really help automate things with Doctrine (my favorite is sfDoctrinePager). Zend Framework is a good choice, but I recommend looking at Symfony first. I would avoid the other PHP MVC frameworks as they tend to be less flexible, and if you're coming from another language you may have your own preferences on how to attack a certain problem - Symfony and ZF will both give you leeway in this sense.