The lucene message class. This class extends its parent class lucene_msg and adds some higher level methods for adding groups of fields to the message.
Located in /lucene-defs.php (line 559)
search | --lucene_connection | --lucene_msg | --lucene_message
Class | Description |
---|---|
![]() |
The lucene query message class. This class inherits all the functionality of the lucene_connection, lucene_msg and lucene_message classes. It adds query-specific methods for searching. |
![]() |
The lucene index message class. This class inherits all the functionality of the lucene_connection, lucene_msg and lucene_message classes. It adds indexing-specific methods. |
![]() |
The lucene unindex message class. This class allows you to remove an item from the Lucene index. You must know the unique ID that identifies the document. |
![]() |
The lucene purge message class. This class allows you to remove all |
![]() |
The lucene utility message class. Used for special Lucene operations. |
Response object which will parse XML content
Inherited from lucene_msg
lucene_msg::$built
lucene_msg::$error_msg
lucene_msg::$fieldset
lucene_msg::$type
lucene_msg::$xmltags
Inherited from lucene_connection
lucene_connection::$connected
lucene_connection::$enabled
lucene_connection::$host
lucene_connection::$message
lucene_connection::$port
lucene_connection::$responsebuf
lucene_connection::$sockfp
lucene_connection::$timeoutsecs
lucene_connection::$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 This is a more complex class which builds on the basic lucene_msg class to provide some higher level methods for adding fields in specific ways to support CONTROL, QUERY and INDEX message types.
Define a field. We supply the name of the field, it's type (Text, Date or Id), and whether it should be stored by Lucene for later retreival in queries. For example you would not store the raw document/content as this is usually stored elsewhere.
We also cater for fields which might not need to be indexed. These would be fields of data you just want to return with the document, if found in a query, but not search on. An example might be a field containing the path to the physical document on disk. For these fields you would then specify NOT_INDEXED for the $indexed parameter. These fields MUST be stored, so we make the rule: if the field is NOT_INDEXED then it must be STORED (this will be forced). In the normal course of events, fields will be defined to be both stored and indexed. The exception is the special "Text" field associated with an item "Body", which is indexed, but never stored. This method adds the field settings directly via the add_field() method.
Specify query offset field 'First'. This sets the offset for the returned results. For example, if this was set to 3, and Lucene found 20 hits, then results would be sent back from the 3rd hit onwards.
Specify query limit field. This sets the maximum number of results that Lucene should return.
Specify a range on a field for querying. We specify the name of a field
which is used to select articles within the given limits, and the limits themeselves. Either limit may be passed as nullstring which indicates no limit on that side. Any dates must be passed as standard Unix timestamps (seconds since 1970). Notes: This method can be called multiple times to define additional ranges for different field names. This method adds the field setting directly via the add_field() method.
Specify the fields you want returned from Lucene.
Fields should be in a comma-separated list of field names. Each field name can have the field type included in the form 'Foo:Date', where 'Date' is the type in this instance. In fact, since 'Text' is the default filed type, 'Date' is probably the only one you need to use as the current implementation stands. This method adds the field setting directly via the add_field() method.
Specify the fields you want query results to be ordered by.
Fields should be in a comma-separated list of field names. Each field name can have the field type included in the form 'Foo:Date', where 'Date' is the type in this instance. In fact, since 'Text' is the default filed type, 'Date' is probably the only one you need to use as the current implementation stands. Note that sort field specification is a special case, where the syntax can be 'Foo:Date:Desc' or 'Foo:Desc' indicating the sort on the given field should be done in descending order.
Supply a stopword list to lucene.
This method adds the field setting directly via the add_field() method.
Inherited From lucene_msg
lucene_msg::lucene_msg()
lucene_msg::add_field()
lucene_msg::add_xmltag()
lucene_msg::clear()
lucene_msg::send()
lucene_msg::set_application()
lucene_msg::set_domain()
Inherited From lucene_connection
lucene_connection::lucene_connection()
lucene_connection::send()
lucene_connection::set_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