Welcome Guest, Not a member yet? Register   Sign In
Lucene search engine
#1

[eluser]Nodren[/eluser]
hey i just wanted to throw this out there and see if anyone has done this before.

basicly, i want to impliment zend's lucene search engine with code igniter.

My reasoning is lucene is an awesome search implimentation, it covers all sorts of things most people dont think about when developing a search engine, and i think code igniter is a much better solution overall for a framework, with the exception its missing search.

Since i'm doing this for a personal project, i thought i could make this into a library, but has anyone already done this? if so do you have any pointers?

My main idea is i want to create a complete wrapper for the zend lucene engine, so you can call the code igniter lucene library and use it with out ever realizing worrying about the fact it interfaces zend framework, i'll only bring in the zend framework files necessary to do it.

i'll be releasing my sourcecode when i'm done, along with some documentation. but it will be for php5 only, and it wont touch any of the default CI code.
#2

[eluser]esra[/eluser]
There is a post and wiki article by one of the FreakAuth authors (Daniel, I think) about using the Zend framework libraries with CI. The Zend framework does have their own implmentation of Lucene.

Before the Kohana framework moved to PHP5, one of the users there wrote a post about integrating Lucene with Kohana. This was still at a point where CodeIgniter and Kohana were closer code wise. They recently switched to using the Vanilla forum, but the old forum is still accessible for researching information only. You might try doing a search for Lucene on the old site.
#3

[eluser]Glen Swinfield[/eluser]
All you should need to do is put the 'Zend' folder, containing only the 'Search' folder and all of its contents on your include path. Then copy Lucene.php into your libraries folder and load it like you would with any other class.

Zend Framework libraries are self contained, If you do need to make a wrapper it will just need the usual $CI =& get_instance() stuff in constructor that checks if the class is already loaded and logs a message etc.

Remember you will need php5 to use ZF libs.
#4

[eluser]mglinski[/eluser]
Give me an hour, ill get it working.
Edit::
Got it.

Do what the above says, although you need to know the class name for the Lucene.php file.
Once you know that you are good to go.
Just an FYI, Any page you include the search engine on adds .25 seconds to the execution time(up from .05, just for loading it). I would not use this, just based on that.
-Matt
#5

[eluser]Henry Weismann[/eluser]
Search lucene is meant to be implemented in large scale websites. For instance if you are using a tagging system of any kind you will find out that after you reach 1 million tagged entries your application will start bogging down and becoming very slow. That is because rdbms databases have scalability issues when dealing with extremely large data sets using "expensive" queries on those datasets. Search lucene based on the java library apache lucene is much faster. You can also look into hadoop.

But if you are using it on a small dataset it's like using a sledge hammer to push in a thumb tack.

Did anyone create this library and if so can they post it in the wiki.
#7

[eluser]Unknown[/eluser]
This one helped me quickly. http://www.cmjackson.net/2009/02/17/how-...deigniter/
#8

[eluser]coldfire82[/eluser]
[quote author="SONG" date="1257559305"]This one helped me quickly. http://www.cmjackson.net/2009/02/17/how-...deigniter/[/quote]

Useful Link. But kind a old. I am gonna try it today. Lets see, if the implementation is still useful.
#9

[eluser]coldfire82[/eluser]
[quote author="coldfire82" date="1293271593"]

Useful Link. But kind a old. I am gonna try it today. Lets see, if the implementation is still useful.[/quote]
Response: Well! worked like a charm.




Theme © iAndrew 2016 - Forum software by © MyBB