The lucene connection class
This class inherits the functionality of the 'search' class since mostly that is what we will be connecting to Lucene for. The Indexing and Control descendants can just ignore this inherited basic searching functionality. This class knows how to connect to a Lucene server and send and receive messages to/from it. Child classes which need to talk to this server to do indexing or querying should inherit this class.
Located in /lucene-defs.php (line 115)
search | --lucene_connection
Class | Description |
---|---|
![]() |
The lucene msg class. This is a raw class which holds the basic message fields and data and knows how to build them into a full message for sending to the lucene server. |
True if we are connected to socket
Whether Lucene is enabled..
HOST running the Lucene query server
The message waiting to be sent
PORT that the server is listening on
Raw response content we receive back from the Lucene server
Socket file pointer
Timeout for send in seconds
An execution timer
Inherited from search
search::$date_end
search::$date_fieldname
search::$date_start
search::$executed
search::$hit
search::$max_results
search::$query
search::$searchterm
search::$skip_results
search::$title
Constructor - Lucene connection
Sends a message to the Lucene server, and receives the response. We operate on the understanding that every time we send something to Lucene we expect a response. Since this method already calls the recieve() method, there is no need to call it from your application.
The content to be sent is expected to be already in the class string variable $message. The response is put into $response which is an array of LF-delimited lines sent back.
Set the socket timeout. Deals with the special case of setting the socket to non-blocking mode (zero timeout)..
Inherited From search
search::search()
search::clear_daterange()
search::clear_search()
search::does_not_match()
search::has_daterange()
search::hitcount()
search::initialise()
search::match()
search::may_match()
search::must_match()
search::reset_search()
search::set_daterange()
search::set_maxresults()
search::set_skipresults()
search::termcount()
Documentation generated by phpDocumentor 1.3.0RC3