[search] element index

Package indexes

All elements
a b c d e f h i l m n o p q r s t u v w x
a
top
Variable $application
Application we are indexing for
Method add_field
lucene_msg::add_field() in lucene-defs.php
Add a field to the fieldset.
Method add_xmltag
lucene_msg::add_xmltag() in lucene-defs.php
Add a new XML tag object to this Lucene message
Method avoid_lockfile
Define a lockfile which we must avoid during indexing. If defined then no indexing will take place while the lockfile exists. The second parameter allows you to specify a limit to the patience of this process, in seconds. Zero means wait forever.
b
top
Variable $built
lucene_msg::$built in lucene-defs.php
True if message has been built
c
top
Variable $connected
True if we are connected to socket
Method clear
lucene_msg::clear() in lucene-defs.php
Clear all data/fields, leaving type definition alone.
Method clear_daterange
search::clear_daterange() in search-defs.php
Clear the date range for the search. Makes sure that the search will not be filtered by a date restriction.
Method clear_search
search::clear_search() in search-defs.php
Clear the search terms only.
d
top
Variable $date_end
search::$date_end in search-defs.php
End date range for search (false means undefined). This
Variable $date_fieldname
search::$date_fieldname in search-defs.php
Name of the field to which daterange should be applied
Variable $date_start
search::$date_start in search-defs.php
Start date range for search (false means undefined). This
Page dbsearch-defs.php
dbsearch-defs.php in dbsearch-defs.php
Method db_search
db_search::db_search() in dbsearch-defs.php
Constructor
Class db_search
db_search in dbsearch-defs.php
DB Search class This class inherits the functionality of the generic 'search' class. It extends it to implement a database search.
Constant DEFAULT_FIELD
DEFAULT_FIELD in lucene-defs.php
The name of the field Lucene should assume if none specified
Constant DEFAULT_FIELDTYPE
DEFAULT_FIELDTYPE in lucene-defs.php
Default type of field: 'Text', 'Date', 'Id'
Method 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.
Method 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.
Method does_not_match
search::does_not_match() in search-defs.php
Define a search term which the search must not match to succeed.
Method does_not_matchfield
Add search term: must not match a field value.
e
top
Variable $enabled
lucene_connection::$enabled in lucene-defs.php
Whether Lucene is enabled..
Variable $error_msg
lucene_msg::$error_msg in lucene-defs.php
Error message if any error occurred
Variable $executed
search::$executed in search-defs.php
Whether we have run a query
Method execute
swish_search::execute() in swish-defs.php
Execute the swish++ search
Method execute
lucene_search::execute() in lucene-defs.php
Execute the search Here we execute a lucene search, overriding the method in the parent class. This involves building the query string, sending it to the Lucene server, and receiving the search results back.
Method execute
db_search::execute() in dbsearch-defs.php
Execute the search Execute the database query search and store any hits.
f
top
Variable $fields
hit::$fields in search-defs.php
Array of fieldname/value pairs - info returned by the search
Variable $fieldset
lucene_msg::$fieldset in lucene-defs.php
Object containing lucene fields
Variable $field_definitions
Index fields definitions array. Contains definitions
Method fieldlist
db_search::fieldlist() in dbsearch-defs.php
Define search fields list
Method from
db_search::from() in dbsearch-defs.php
Define search table FROM list
h
top
Variable $hit
search::$hit in search-defs.php
Array of hits returned. Each element of this array is
Variable $host
lucene_connection::$host in lucene-defs.php
HOST running the Lucene query server
Variable $host
lucene_fileindexer::$host in lucene-defs.php
Host to connect to
Method has_daterange
search::has_daterange() in search-defs.php
Return true if at least one of our dates is set.
Method hit
hit::hit() in search-defs.php
Constructor Create a new search hit.
Class hit
hit in search-defs.php
The search hit class Something to contain a search hit which is defined as an array of information. The format of this array is entirely up to the search being performed, and is not enforced here.
Method hitcount
search::hitcount() in search-defs.php
Return count of hits present in this search.
i
top
Variable $id
term::$id in search-defs.php
ID field provided for optional application use
Variable $idoffset
ID generation offset
Variable $idprefix
ID generation prefix
Variable $idsource
ID generation source
Variable $indexed
lucene_indexmsg::$indexed in lucene-defs.php
Indication that the indexing was successful
Variable $indexfields
Fields for indexing. This is an array of fieldname/value
Variable $ixid
lucene_fileindexer::$ixid in lucene-defs.php
The index ID
Constant ID_FROM_FILENAME
ID_FROM_FILENAME in lucene-defs.php
Mode of index ID generation is by full filename (incl. extension)
Constant ID_FROM_INC
ID_FROM_INC in lucene-defs.php
Mode of index ID generation is by incrementing integer
Constant ID_FROM_NAME
ID_FROM_NAME in lucene-defs.php
Mode of index ID generation is by filename stripped of path and extension
Constant ID_FROM_PATH
ID_FROM_PATH in lucene-defs.php
Mode of index ID generation is by full path to file
Method 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.
Constant INDEXED
INDEXED in lucene-defs.php
Used to indicate that a field should be indexed by Lucene
Method index_content
Index the given content against the given ID. This automatically
Method 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.
Method index_field
Supply field content for indexing. This causes Lucene to take the given fieldname and index the given value against it.
Method index_file
Index a file located at the given path, using given ID.
Method 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.
Method initialise
search::initialise() in search-defs.php
Initialise everything about the search.
l
top
Variable $lockfile
Path to a lockfile we should give way to. If this value
Variable $lockfile_wait_secs
Number of seconds to wait on a lockfile. If zero, wait forever.
Variable $lucene_indexer
The index object which does the work
Method limit
db_search::limit() in dbsearch-defs.php
Define search LIMIT clause
Page lucene-defs.php
lucene-defs.php in lucene-defs.php
Function lucene_backup
lucene_backup() in lucene-defs.php
Function to make a backup of the Lucene index. This would commonly
Class lucene_connection
lucene_connection in lucene-defs.php
The lucene connection class
Method lucene_connection
Constructor - Lucene connection
Class lucene_fileindexer
lucene_fileindexer in lucene-defs.php
The lucene file indexer class.
Method lucene_fileindexer
Constructor
Class lucene_indexmsg
lucene_indexmsg in lucene-defs.php
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.
Method lucene_indexmsg
Constructor Make a new Lucene index message.
Method 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.
Class lucene_message
lucene_message in lucene-defs.php
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.
Method lucene_msg
lucene_msg::lucene_msg() in lucene-defs.php
Constructor
Class lucene_msg
lucene_msg in lucene-defs.php
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.
Function lucene_optimize
lucene_optimize() in lucene-defs.php
Function to optimize the Lucene index. This would commonly be used after a batch of items have been indexed.
Function lucene_purge
lucene_purge() in lucene-defs.php
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!?".
Method lucene_purgemsg
Constructor Make a new Lucene purge message. This message is provided to allow you to delete all items from the Lucene index.
Class lucene_purgemsg
lucene_purgemsg in lucene-defs.php
The lucene purge message class. This class allows you to remove all
Method 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.
Class lucene_querymsg
lucene_querymsg in lucene-defs.php
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.
Method lucene_search
Constructor
Class lucene_search
lucene_search in lucene-defs.php
The lucene search class
Method 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.
Class lucene_unindexmsg
lucene_unindexmsg in lucene-defs.php
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.
Method lucene_utilitymsg
Constructor
Class lucene_utilitymsg
lucene_utilitymsg in lucene-defs.php
The lucene utility message class. Used for special Lucene operations.
m
top
Variable $max_results
search::$max_results in search-defs.php
Maximum results to return in query
Variable $message
lucene_connection::$message in lucene-defs.php
The message waiting to be sent
Variable $metascan
Scan for meta tags as fields in file content. Recommended.
Variable $meta_fields
Meta fields definitions array. Contains definitions
Method match
lucene_search::match() in lucene-defs.php
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.
Method match
search::match() in search-defs.php
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.
Method matchfield
lucene_search::matchfield() in lucene-defs.php
Add search term to match a field value.
Method matchrange
lucene_search::matchrange() in lucene-defs.php
Add search term to match a field value range.
Method may_match
search::may_match() in search-defs.php
Define a search term which the search may or may not match.
Method may_matchfield
Add search term: may match a field value.
Method 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.
Constant META_TAG_FIELDS
META_TAG_FIELDS in lucene-defs.php
Indicates index fields come from meta tag extraction
Method must_match
search::must_match() in search-defs.php
Define a search term which the search must match to succeed.
Method must_matchfield
Add search term: must match a field value.
n
top
Method noscantags
Flag that we should NOT do a tag scan on the content of the files.
Constant NOT_INDEXED
NOT_INDEXED in lucene-defs.php
Used to indicate that a field should NOT be indexed by Lucene
Constant NOT_STORED
NOT_STORED in lucene-defs.php
Used to indicate that a field should NOT be stored by Lucene
o
top
Variable $operator
term::$operator in search-defs.php
Join operator, one of: 'AND', 'OR', 'NOT', 'AND NOT'
Method orderby
db_search::orderby() in dbsearch-defs.php
Define search ORDER BY clause
p
top
Variable $port
lucene_fileindexer::$port in lucene-defs.php
Port to connect to
Variable $port
lucene_connection::$port in lucene-defs.php
PORT that the server is listening on
q
top
Variable $query
search::$query in search-defs.php
Query string container
r
top
Variable $response
lucene_message::$response in lucene-defs.php
Response object which will parse XML content
Variable $responsebuf
Raw response content we receive back from the Lucene server
Method reset_search
search::reset_search() in search-defs.php
Reset search results Reset the search results, hit-count, and query executed status.
s
top
Variable $searchdir
swish_search::$searchdir in swish-defs.php
Directory to do the search from
Variable $searchindex
swish_search::$searchindex in swish-defs.php
Name of index file to use (defaults to 'swish++.index')
Variable $searchquery
db_search::$searchquery in dbsearch-defs.php
The query which runs the search
Variable $searchterm
search::$searchterm in search-defs.php
Array of search terms to match
Variable $serialno
lucene_indexmsg::$serialno in lucene-defs.php
A unique handle to identify the index
Variable $skip_results
search::$skip_results in search-defs.php
No. of results to skip in query (for paging)
Variable $sockfp
lucene_connection::$sockfp in lucene-defs.php
Socket file pointer
Variable $sort_limit_exceeded
Set to true if sort limit was exceeded in query
Variable $sort_memory_exceeded
Set to true if Lucene blew its memory trying to sort
Method 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.
Method search
search::search() in search-defs.php
Constructor Create a new search.
Class search
search in search-defs.php
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.
Page search-defs.php
search-defs.php in search-defs.php
Method send
lucene_msg::send() in lucene-defs.php
Sends the current message to Lucene, and checks for protocol errors in the received response.
Method send
lucene_querymsg::send() in lucene-defs.php
Send the message to Lucene, and then post-process the response for
Method send
lucene_utilitymsg::send() in lucene-defs.php
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.
Method send
lucene_indexmsg::send() in lucene-defs.php
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.
Method send
lucene_connection::send() in lucene-defs.php
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.
Method set_application
Specify the application. The application is the name of a configuration
Method set_daterange
search::set_daterange() in search-defs.php
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.
Method set_domain
lucene_msg::set_domain() in lucene-defs.php
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.
Method set_first
lucene_message::set_first() in lucene-defs.php
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.
Method set_limit
lucene_message::set_limit() in lucene-defs.php
Specify query limit field. This sets the maximum number of results that Lucene should return.
Method set_maxresults
search::set_maxresults() in search-defs.php
Set maximum results Sets the maximum results to return from the search.
Method set_query
lucene_querymsg::set_query() in lucene-defs.php
Set the query for this message. There can be only one query defined.
Method set_range
lucene_message::set_range() in lucene-defs.php
Specify a range on a field for querying. We specify the name of a field
Method set_returnfields
Specify the fields you want returned from Lucene.
Method set_searchdir
Set search directory Set the root directory to go to and search from.
Method 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'.
Method set_searchquery
db_search::set_searchquery() in dbsearch-defs.php
Define the search query object
Method set_skipresults
search::set_skipresults() in search-defs.php
Set skip results
Method set_sortorder
Specify the fields you want query results to be ordered by.
Method set_stopwords
Supply a stopword list to lucene.
Method set_timeout
Set the socket timeout. Deals with the special case of setting the socket to non-blocking mode (zero timeout)..
Constant SOCK_FOREVER
SOCK_FOREVER in lucene-defs.php
Wait on socket forever (well, 24hrs is that, more or less)
Constant SOCK_NO_WAIT
SOCK_NO_WAIT in lucene-defs.php
Do not wait on socket receive, return immediately
Constant SOCK_RETRIES
SOCK_RETRIES in lucene-defs.php
Times to retry timed-out socket sends/receives
Constant STORED
STORED in lucene-defs.php
Used to indicate that a field should be stored by Lucene
Page swish-defs.php
swish-defs.php in swish-defs.php
Method swish_search
Constructor
Class swish_search
swish_search in swish-defs.php
The swish search class
t
top
Variable $text
term::$text in search-defs.php
The text of this search term
Variable $timeoutsecs
Timeout for send in seconds
Variable $timeoutsecs
Timeout for indexing commands in seconds (can usually leave
Variable $timer
lucene_fileindexer::$timer in lucene-defs.php
Indexing execution timer
Variable $timer
lucene_connection::$timer in lucene-defs.php
An execution timer
Variable $title
search::$title in search-defs.php
Title for heading of output
Variable $type
lucene_msg::$type in lucene-defs.php
Type/name of this message
Class term
term in search-defs.php
The search term class Something to contain a search term. A search term is basically a string of one or more words to match, together with the operator to apply with the match.
Method term
term::term() in search-defs.php
Constructor Create a new search term.
Method termcount
search::termcount() in search-defs.php
Return count of searchterms present in this search.
u
top
Method unindex
lucene_unindexmsg::unindex() in lucene-defs.php
Unindex the given document, as identified by the unique ID. If no errors arise, then the item will be removed from the Lucene index.
v
top
Variable $valid
term::$valid in search-defs.php
True if this term is deemed valid
w
top
Method where
db_search::where() in dbsearch-defs.php
Define search WHERE clause
x
top
Variable $xmltags
lucene_msg::$xmltags in lucene-defs.php
Array containing XML tags
a b c d e f h i l m n o p q r s t u v w x