-
$date_end
-
End date range for search (false means undefined). This
-
$date_fieldname
-
Name of the field to which daterange should be applied
-
$date_start
-
Start date range for search (false means undefined). This
-
dbsearch-defs.php
-
-
db_search
-
Constructor
-
db_search
-
DB Search class This class inherits the functionality of the generic 'search' class. It extends it to implement a database search.
-
DEFAULT_FIELD
-
The name of the field Lucene should assume if none specified
-
DEFAULT_FIELDTYPE
-
Default type of field: 'Text', 'Date', 'Id'
-
define_field
-
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.
-
define_field
-
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.
-
does_not_match
-
Define a search term which the search must not match to succeed.
-
does_not_matchfield
-
Add search term: must not match a field value.
-
$id
-
ID field provided for optional application use
-
$idoffset
-
ID generation offset
-
$idprefix
-
ID generation prefix
-
$idsource
-
ID generation source
-
$indexed
-
Indication that the indexing was successful
-
$indexfields
-
Fields for indexing. This is an array of fieldname/value
-
$ixid
-
The index ID
-
ID_FROM_FILENAME
-
Mode of index ID generation is by full filename (incl. extension)
-
ID_FROM_INC
-
Mode of index ID generation is by incrementing integer
-
ID_FROM_NAME
-
Mode of index ID generation is by filename stripped of path and extension
-
ID_FROM_PATH
-
Mode of index ID generation is by full path to file
-
id_generate
-
Set the source for ID generation. Since we are indexing a bunch of files, the ID's have to be generated on demand inside the loop. So we provide for various ways here, and you can extend this class to provide more if required.
-
INDEXED
-
Used to indicate that a field should be indexed by Lucene
-
index_content
-
Index the given content against the given ID. This automatically
-
index_field
-
Supply field content for indexing. This causes Lucene to take the given fieldname and index the given value against it. NB: we silently ignore the request for nullstring, since these cause Lucene indexing to throw an exception, and indexing will fail.
-
index_field
-
Supply field content for indexing. This causes Lucene to take the given fieldname and index the given value against it.
-
index_file
-
Index a file located at the given path, using given ID.
-
index_tree
-
Index a tree of files starting at the path given. We index these in one of four modes, which determines how we generate the ID for each item: 'ID_FROM_INC' mode uses an incremental counter starting at 1. If $prefix holds a number, the counter will start at this number instead of one.
-
initialise
-
Initialise everything about the search.
-
$lockfile
-
Path to a lockfile we should give way to. If this value
-
$lockfile_wait_secs
-
Number of seconds to wait on a lockfile. If zero, wait forever.
-
$lucene_indexer
-
The index object which does the work
-
limit
-
Define search LIMIT clause
-
lucene-defs.php
-
-
lucene_backup
-
Function to make a backup of the Lucene index. This would commonly
-
lucene_connection
-
The lucene connection class
-
lucene_connection
-
Constructor - Lucene connection
-
lucene_fileindexer
-
The lucene file indexer class.
-
lucene_fileindexer
-
Constructor
-
lucene_indexmsg
-
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.
-
lucene_indexmsg
-
Constructor Make a new Lucene index message.
-
lucene_message
-
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.
-
lucene_message
-
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.
-
lucene_msg
-
Constructor
-
lucene_msg
-
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.
-
lucene_optimize
-
Function to optimize the Lucene index. This would commonly be used after a batch of items have been indexed.
-
lucene_purge
-
Function to purge the Lucene index of all indexes to documents. Yes, I'll repeat that - it DELETES ALL DOCUMENTS FROM THE INDEX, permanently, finito, shazam, ba-boom, as in "Omigod did I *really* mean to do that!?".
-
lucene_purgemsg
-
Constructor Make a new Lucene purge message. This message is provided to allow you to delete all items from the Lucene index.
-
lucene_purgemsg
-
The lucene purge message class. This class allows you to remove all
-
lucene_querymsg
-
Constructor Make a new Lucene query message. You can specify the application to use here, and also an optional query string to send.
-
lucene_querymsg
-
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.
-
lucene_search
-
Constructor
-
lucene_search
-
The lucene search class
-
lucene_unindexmsg
-
Constructor Make a new Lucene unindex message. This message is provided to allow you to delete an item from the Lucene index. It has a single method 'unindex' which takes the ID of the item to delete.
-
lucene_unindexmsg
-
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.
-
lucene_utilitymsg
-
Constructor
-
lucene_utilitymsg
-
The lucene utility message class. Used for special Lucene operations.
-
$max_results
-
Maximum results to return in query
-
$message
-
The message waiting to be sent
-
$metascan
-
Scan for meta tags as fields in file content. Recommended.
-
$meta_fields
-
Meta fields definitions array. Contains definitions
-
match
-
Add a new search term to match. Search terms can be a single word or compound patterns, Each time one of these is added, it has an operator associated with it - whether this term is a "may have" (OR), or a "must have" (AND) term.
-
match
-
Add a new search term to match. Search terms can be a single word or compound patterns, Each time one of these is added, it has an operator associated with it - whether this term is a "may have" (OR), or a "must have" (AND) term.
-
matchfield
-
Add search term to match a field value.
-
matchrange
-
Add search term to match a field value range.
-
may_match
-
Define a search term which the search may or may not match.
-
may_matchfield
-
Add search term: may match a field value.
-
meta_field
-
Define a field as a meta tag. This ensures that the field will be picked up from the file meta tags, if present. If it is not listed here then it will be ignored.
-
META_TAG_FIELDS
-
Indicates index fields come from meta tag extraction
-
must_match
-
Define a search term which the search must match to succeed.
-
must_matchfield
-
Add search term: must match a field value.
-
$searchdir
-
Directory to do the search from
-
$searchindex
-
Name of index file to use (defaults to 'swish++.index')
-
$searchquery
-
The query which runs the search
-
$searchterm
-
Array of search terms to match
-
$serialno
-
A unique handle to identify the index
-
$skip_results
-
No. of results to skip in query (for paging)
-
$sockfp
-
Socket file pointer
-
$sort_limit_exceeded
-
Set to true if sort limit was exceeded in query
-
$sort_memory_exceeded
-
Set to true if Lucene blew its memory trying to sort
-
scantags
-
Flag that we should do a tag scan on the content of the files to try and extract fields to index. Note that any tags thus found will only be used if the field name has been defined with the method define_field(); This causes both the <title> tag and <meta> tags to be considered.
-
search
-
Constructor Create a new search.
-
search
-
The search class is an object which can be assigned search terms, can execute a search, and can contain search hits having executed a seach.
-
search-defs.php
-
-
send
-
Sends the current message to Lucene, and checks for protocol errors in the received response.
-
send
-
Send the message to Lucene, and then post-process the response for
-
send
-
Send the message to Lucene, and then post-process the response for indication of a successful utility operation. We expect to receive a response back from Lucene which has nothing much it, unless there has been an error.
-
send
-
Send the message to Lucene, and then post-process the response for indication of a successful index operation. We expect to receive a response back from Lucene which has our serialno in it. This method returns True if the indexing was successful, else False.
-
send
-
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.
-
set_application
-
Specify the application. The application is the name of a configuration
-
set_daterange
-
Set date range Set the date range for the search. This is just recording the given date information for use by child classes of this one. We do not even care what the format of the dates is. They are just stored.
-
set_domain
-
Specify a domain. A domain is an identifier which groups indexed objects internally to Lucene. This allows searches on multiple archives of documents in a single Lucene installation.
-
set_first
-
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.
-
set_limit
-
Specify query limit field. This sets the maximum number of results that Lucene should return.
-
set_maxresults
-
Set maximum results Sets the maximum results to return from the search.
-
set_query
-
Set the query for this message. There can be only one query defined.
-
set_range
-
Specify a range on a field for querying. We specify the name of a field
-
set_returnfields
-
Specify the fields you want returned from Lucene.
-
set_searchdir
-
Set search directory Set the root directory to go to and search from.
-
set_searchindex
-
Set search index filename Defines the index filename to use for searching. If no filename is specified in the constructor (@see swish_search()) or via this method, then the default is used: 'swish++.index'.
-
set_searchquery
-
Define the search query object
-
set_skipresults
-
Set skip results
-
set_sortorder
-
Specify the fields you want query results to be ordered by.
-
set_stopwords
-
Supply a stopword list to lucene.
-
set_timeout
-
Set the socket timeout. Deals with the special case of setting the socket to non-blocking mode (zero timeout)..
-
SOCK_FOREVER
-
Wait on socket forever (well, 24hrs is that, more or less)
-
SOCK_NO_WAIT
-
Do not wait on socket receive, return immediately
-
SOCK_RETRIES
-
Times to retry timed-out socket sends/receives
-
STORED
-
Used to indicate that a field should be stored by Lucene
-
swish-defs.php
-
-
swish_search
-
Constructor
-
swish_search
-
The swish search class