Lucene with PHP

前端 未结 6 1820
醉梦人生
醉梦人生 2020-12-03 04:44

Can I use Lucene with PHP ? I don\'t want to use Zend. Can I use in native PHP (not framework) ?

相关标签:
6条回答
  • 2020-12-03 05:08

    When you say you don't want to use Zend, I'm assuming you mean you don't want to use the whole Zend Framework. Well you don't have to - the individual Zend components can be used on their own without needing to be part of a Zend framework project.

    0 讨论(0)
  • 2020-12-03 05:09

    I would recommend using Apache SOLR as your Lucene backend and connecting via web service calls from your PHP code.

    I'd also note that it's easy to pick and choose components of Zend Framework for use in your application without loading the entire framework. You could use Zend_Search_Lucene in your site and forego Zend's MVC, database, and related components.

    0 讨论(0)
  • 2020-12-03 05:09

    Yeah you can simply code a java module for indexing and searching purpose using apache lucene library. Then you can merge it with php module with php/java bridge or SOAP. It will be quite good learning experience for you.

    0 讨论(0)
  • 2020-12-03 05:14

    I'm using Lucene with PHP doing system calls on Java, for example:

    java ... .SearchFiles -index C:\shop\system\index -high -queries Computer* 
    

    I have adapted SearchFiles to produce HTML code but the output may as well be dynamic PHP code (for example an array holding the search results).

    The system is very fast and you don't need more than Java on the server.

    0 讨论(0)
  • 2020-12-03 05:20

    Also worth noting, SOLR (http://lucene.apache.org/solr/) has a simple HTTP API, and is built on top of Lucene, so if it provides what you need, then that's an easy answer!

    I don't have direct experience with Lucene with PHP, so I'll defer to the experts on that.

    0 讨论(0)
  • 2020-12-03 05:29

    I recommend apache SOLR and then use php extension for solr. http://php.net/manual/en/book.solr.php

    No need for zend framework, just native php

    0 讨论(0)
提交回复
热议问题