diff --git a/foreign dlls/Examine.dll b/foreign dlls/Examine.dll
index 4b6c0f6840..eaf05c5cc3 100644
Binary files a/foreign dlls/Examine.dll and b/foreign dlls/Examine.dll differ
diff --git a/foreign dlls/Examine.xml b/foreign dlls/Examine.xml
new file mode 100644
index 0000000000..69e6cfef3b
--- /dev/null
+++ b/foreign dlls/Examine.xml
@@ -0,0 +1,473 @@
+
+
+
+ Examine
+
+
+
+
+ Override this method so that the Distinct() operator works
+
+
+
+
+
+
+ Override this method so that the Distinct() operator works
+
+
+
+
+
+ Returns the key value pair for the index specified
+
+
+
+
+
+
+ Returns the value for the key specified
+
+
+
+
+
+
+ An interface representing an Examine Searcher
+
+
+
+
+ Searches the specified search text in all fields of the index
+
+ The search text.
+ The max number of results.
+ if set to true the search will use wildcards.
+ Search Results
+
+
+
+ Searches using the specified search query parameters
+
+ The search parameters.
+ Search Results
+
+
+
+ Creates a search criteria instance as required by the implementation
+
+ The max number of results.
+ The type of data in the index.
+ An instance of
+
+
+
+ Interface to represent an Examine Indexer
+
+
+
+
+ Forces a particular XML node to be reindexed
+
+ XML node to reindex
+ Type of index to use
+
+
+
+ Deletes a node from the index
+
+ Node to delete
+
+
+
+ Re-indexes all data for the index type specified
+
+
+
+
+
+ Rebuilds the entire index from scratch for all index types
+
+
+
+
+ Gets/sets the index criteria to create the index with
+
+ The indexer data.
+
+
+
+ Uses the default provider specified to search
+
+
+
+ This is just a wrapper for the default provider
+
+
+
+ Uses the default provider specified to search
+
+
+
+
+
+
+
+
+ Reindex nodes for the providers specified
+
+
+
+
+
+
+
+ Deletes index for node for the specified providers
+
+
+
+
+
+
+ Reindex nodes for all providers
+
+
+
+
+
+
+ Deletes index for node for all providers
+
+
+
+
+
+ Singleton
+
+
+
+
+ Simple class to store the definition of an indexed node
+
+
+
+
+ A collection of Examine Index Providers
+
+
+
+
+ Adds a provider to the collection.
+
+ The provider to be added.
+
+ The collection is read-only.
+
+
+ is null.
+
+
+ The of is null.
+ - or -
+ The length of the of is less than 1.
+
+
+
+
+
+
+
+ Gets the enumerator.
+
+
+
+
+
+ Returns an object that implements the interface to iterate through the collection.
+
+
+ An object that implements to iterate through the collection.
+
+
+
+
+ Gets the with the specified name.
+
+
+
+
+
+ Gets the at the specified index.
+
+
+
+
+
+ Simple search method which should default to searching content nodes
+
+
+
+
+
+
+
+
+ Creates an instance of SearchCriteria for the provider
+
+ A blank SearchCriteria
+
+
+
+ Base class for an Examine Index Provider. You must implement this class to create an IndexProvider
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The indexer data.
+
+
+
+ Initializes the provider.
+
+ The friendly name of the provider.
+ A collection of the name/value pairs representing the provider-specific attributes specified in the configuration for this provider.
+
+ The name of the provider is null.
+
+
+ The name of the provider has a length of zero.
+
+
+ An attempt is made to call on a provider after the provider has already been initialized.
+
+
+
+
+ Forces a particular XML node to be reindexed
+
+ XML node to reindex
+ Type of index to use
+
+
+
+ Deletes a node from the index
+
+ Node to delete
+
+
+
+ Re-indexes all data for the index type specified
+
+
+
+
+
+ Rebuilds the entire index from scratch for all index types
+
+
+
+
+ Called when a node is ignored by the ValidateDocument method.
+
+
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Gets or sets a value indicating whether this is enabled.
+
+ true if enabled; otherwise, false.
+
+
+
+ Determines if the manager will call the indexing methods when content is saved or deleted as
+ opposed to cache being updated.
+
+
+
+
+ Gets/sets the index criteria to create the index with
+
+
+
+
+ Occurs for an Indexing Error
+
+
+
+
+ Occurs when a node is in its Indexing phase
+
+
+
+
+ Occurs when a node is in its Indexed phase
+
+
+
+
+ Occurs when a collection of nodes are in their Indexing phase (before a single node is processed)
+
+
+
+
+ Occurs when the collection of nodes have been indexed
+
+
+
+
+ Occurs when the indexer is gathering the fields and their associated data for the index
+
+
+
+
+ Occurs when a node is deleted from the index
+
+
+
+
+ Occurs when a particular field is having its data obtained
+
+
+
+
+ Occurs when node is found but outside the supported node set
+
+
+
+
+ Config section for the Examine Index Providers
+
+
+
+
+ Gets the indexing providers.
+
+ The providers.
+
+
+
+ If true, the IndexingActionHandler will be run to keep the default index up to date.
+
+
+
+
+ Config section for the Examine search providers
+
+
+
+
+ Gets the search providers.
+
+ The providers.
+
+
+
+ Gets or sets the default provider.
+
+ The default provider.
+
+
+
+ a data structure for storing indexing/searching instructions
+
+
+
+
+ Specifies the number of results to return
+
+
+
+
+ If true the total number of matches (hits) will be calculated
+
+
+
+
+ Number of matches (hits) from this search criteria
+
+
+
+
+ Indicates the type of data to search on
+
+
+
+
+ Config section for Examine
+
+
+
+
+ Gets the instance of the Examine settings.
+
+ The instance.
+
+
+
+ Gets the search providers.
+
+ The search providers.
+
+
+
+ Gets the index providers.
+
+ The index providers.
+
+
+
diff --git a/foreign dlls/UmbracoExamine.XML b/foreign dlls/UmbracoExamine.XML
new file mode 100644
index 0000000000..ff7a0fa7c8
--- /dev/null
+++ b/foreign dlls/UmbracoExamine.XML
@@ -0,0 +1,698 @@
+
+
+
+ UmbracoExamine
+
+
+
+
+ Default property for accessing an IndexField definition
+
+ Field Name
+
+
+
+
+ Simple search method which defaults to searching content nodes
+
+
+
+
+
+
+
+
+ Creates a list of dictionary's from the hits object and returns a list of SearchResult.
+ This also removes duplicates.
+
+ The top docs.
+ The search fields.
+ The searcher.
+
+
+
+
+ Directory where the Lucene.NET Index resides
+
+
+
+
+ The analyzer to use when searching content, by default, this is set to StandardAnalyzer
+
+
+
+
+ Name of the Lucene.NET index set
+
+
+
+
+ Static methods to help query umbraco xml
+
+
+
+
+ Converts a content node to XDocument
+
+
+ true if data is going to be returned from cache
+
+
+ If the type of node is not a Document, the cacheOnly has no effect, it will use the API to return
+ the xml.
+
+
+
+
+ Converts an to a
+
+ Node to convert
+ Converted node
+
+
+
+ Creates an from the collection of
+
+ Elements to create document from
+ Document containing elements
+
+
+
+ Converts an umbraco library call to an XDocument
+
+
+
+
+
+
+ Checks if the XElement is an umbraco property based on an alias.
+ This works for both types of schemas
+
+
+
+
+
+
+
+ Returns true if the XElement is recognized as an umbraco xml NODE (doc type)
+
+
+
+
+
+
+ This takes into account both schemas and returns the node type alias.
+ If this isn't recognized as an element node, this returns an empty string
+
+
+
+
+
+
+ Returns the property value for the doc type element (such as id, path, etc...)
+ If the element is not an umbraco doc type node, or the property name isn't found, it returns String.Empty
+
+
+
+
+
+
+
+ Returns umbraco value for a data element with the specified alias.
+
+
+
+
+
+
+
+ Extension methods for IndexSet
+
+
+
+
+ Convert the indexset to indexerdata
+
+
+
+
+
+
+ Returns a string array of all fields that are indexed including Umbraco fields
+
+
+
+
+
+
+
+ Some links picked up along the way:
+
+ A matrix of concurrent lucene operations:
+ http://www.jguru.com/faq/view.jsp?EID=913302.
+
+ based on the info here, it is best to only call optimize when there is no activity,
+ we only optimized after the queue has been processed and at startup:
+ http://www.gossamer-threads.com/lists/lucene/java-dev/47895
+ http://lucene.apache.org/java/2_2_0/api/org/apache/lucene/index/IndexWriter.html
+
+
+
+
+ Specifies how many index commits are performed before running an optimization
+
+
+
+
+ Used to store a non-tokenized key for the document
+
+
+
+
+ Used to store a non-tokenized type for the document
+
+
+
+
+ Set up all properties for the indexer based on configuration information specified. This will ensure that
+ all of the folders required by the indexer are created and exist. This will also create an instruction
+ file declaring the computer name that is part taking in the indexing. This file will then be used to
+ determine the master indexer machine in a load balanced environment (if one exists).
+
+
+
+
+
+
+ Used to perform thread locking
+
+
+
+
+ used to thread lock calls for creating and verifying folders
+
+
+
+
+ Forces a particular XML node to be reindexed
+
+ XML node to reindex
+ Type of index to use
+
+
+
+ Rebuilds the entire index from scratch for all index types
+
+ This will completely delete the index and recreate it
+
+
+
+ Deletes a node from the index
+
+
+
+
+
+ Re-indexes all data for the index type specified
+
+
+
+
+
+ Adds single node to index. If the node already exists, a duplicate will probably be created,
+ To re-index, use the ReIndexNode method.
+
+ The node.
+ The type.
+
+
+
+ This wil optimize the index for searching, this gets executed when this class instance is instantiated.
+
+
+ This can be an expensive operation and should only be called when there is no indexing activity
+
+
+
+
+ Removes the specified term from the index
+
+
+ Boolean if it successfully deleted the term, or there were on errors
+
+
+
+ Ensures that the node being indexed is of a correct type and is a descendent of the parent id specified.
+
+
+
+
+
+
+ Collects all of the data that neesd to be indexed as defined in the index set.
+
+
+
+
+
+
+ Collects the data for the fields and adds the document.
+
+
+ This will normalize (lowercase) all text before it goes in to the index.
+
+
+
+
+
+
+
+
+ Process all of the queue items. This checks if this machine is the Executive and if it's in a load balanced
+ environments. If then acts accordingly:
+ Not the executive = doesn't index, i
+ In async mode = use file watcher timer
+
+
+
+
+ Loop through all files in the queue item folder and index them.
+ Regardless of weather this machine is the executive indexer or not or is in a load balanced environment
+ or not, this WILL attempt to process the queue items into the index.
+
+
+ The number of queue items processed
+
+
+ Inheritors should be very carefly using this method, SafelyProcessQueueItems will ensure
+ that the correct machine processes the items into the index. SafelyQueueItems calls this method
+ if it confirms that this machine is the one to process the queue.
+
+
+
+
+ Saves a file indicating that the executive indexer should remove the from the index those that match
+ the term saved in this file.
+ This will save a file prefixed with the current machine name with an extension of .dev
+
+
+
+
+
+ Writes the information for the fields to a file names with the computer's name that is running the index and
+ a GUID value. The indexer will then index the values stored in the files in another thread so that processing may continue.
+ This will save a file prefixed with the current machine name with an extension of .add
+
+
+
+
+
+
+ Handles the file watcher timer poll elapsed event
+ This will:
+ - Disable the FileSystemWatcher
+ - Recursively process all queue items in the folder and check after processing if any more files have been added
+ - Once there's no more files to be processed, re-enables the watcher
+
+
+
+
+
+
+ Checks the writer passed in to see if it is active, if not, checks if the index is locked. If it is locked,
+ returns checks if the reader is not null and tries to close it. if it's still locked returns null, otherwise
+ creates a new writer.
+
+
+
+
+
+
+ Checks the reader passed in to see if it is active, if not, checks if the index is locked. If it is locked,
+ returns checks if the writer is not null and tries to close it. if it's still locked returns null, otherwise
+ creates a new reader.
+
+
+
+
+
+
+ Reads the FileInfo passed in into a dictionary object and deletes it from the index
+
+
+
+
+
+ Reads the FileInfo passed in into a dictionary object and adds it to the index
+
+
+
+
+
+ All field data will be stored into Lucene as is except for dates, these can be stored as standard: yyyyMMdd
+ Any standard text will be put in lower case format.
+
+
+
+
+
+
+ Unfortunately, we need to implement our own IsProtected method since
+ the Umbraco core code requires an HttpContext for this method and when we're running
+ async, there is no context
+
+
+
+
+
+
+ Unfortunately, we need to implement our own IsProtected method since
+ the Umbraco core code requires an HttpContext for this method and when we're running
+ async, there is no context
+
+
+
+
+
+
+
+ Adds all nodes with the given xPath root.
+
+ The x path.
+ The type.
+
+
+
+ Creates the folder if it does not exist.
+
+
+
+
+
+ Checks if the index is ready to open/write to.
+
+
+
+
+
+ Check if there is an index in the index folder
+
+
+
+
+
+ Adds a log entry to the umbraco log
+
+
+
+
+
+
+
+ When the object is disposed, all data should be written
+
+
+
+
+ The analyzer to use when indexing content, by default, this is set to StandardAnalyzer
+
+
+
+
+ Used to keep track of how many index commits have been performed.
+ This is used to determine when index optimization needs to occur.
+
+
+
+
+ The Executive to determine if this is the master indexer
+
+
+
+
+ By default this is false, if set to true then the indexer will include indexing content that is flagged as publicly protected.
+ This property is ignored if SupportUnpublishedContent is set to true.
+
+
+
+
+ Occurs when [index optimizing].
+
+
+
+
+ Occurs when [document writing].
+
+
+
+
+ Determines if the manager will call the indexing methods when content is saved or deleted as
+ opposed to cache being updated.
+
+
+
+
+
+ Deletes all files in the folder and returns the number deleted.
+
+
+
+
+
+
+ An instance for wiring up Examine to the Umbraco events system
+
+
+
+
+ Creates a new instance of the class
+
+
+
+
+ Only index using providers that SupportUnpublishedContent
+
+
+
+
+
+
+ Only remove indexes using providers that SupportUnpublishedContent
+
+
+
+
+
+
+ Only Update indexes for providers that dont SupportUnpublishedContent
+
+
+
+
+
+
+ Only update indexes for providers that don't SupportUnpublishedContnet
+
+
+
+
+
+
+ Defines XPath statements that map to specific umbraco nodes
+
+
+
+
+ Set this to configure the default maximum search results for an index set.
+ If not set, 200 is the default.
+
+
+
+
+ Returns the DirectoryInfo object for the index path.
+
+
+
+
+ When this property is set, the indexing will only index documents that are children of this node.
+
+
+
+
+ The collection of node types to index, if not specified, all node types will be indexed (apart from the ones specified in the ExcludeNodeTypes collection).
+
+
+
+
+ The collection of node types to not index. If specified, these node types will not be indexed.
+
+
+
+
+ A collection of user defined umbraco fields to index
+
+
+
+
+ The fields umbraco values that will be indexed. i.e. id, nodeTypeAlias, writer, etc...
+
+
+
+
+ Event arguments for a Document Writing event
+
+
+
+
+
+
+
+
+
+
+
+
+ Lucene.NET Document, including all previously added fields
+
+
+
+
+ Fields of the indexer
+
+
+
+
+ NodeId of the document being written
+
+
+
+
+ A class that defines the type of index for each Umbraco field (non user defined fields)
+ Alot of standard umbraco fields shouldn't be tokenized or even indexed, just stored into lucene
+ for retreival after searching.
+
+
+
+
+ return the index policy for the field name passed in, if not found, return normal
+
+
+
+
+
+
+ Default property for accessing Image Sets
+
+
+
+
+
+
+ Manages the delegation of authority over which machine in a load balanced environment will perform the indexing.
+ This is done by an IO race on initialization of the LuceneExamineIndexer.
+ If a server's app pool is recycled at a seperate time than the rest of the servers in the cluster, it will generally
+ take over the executive role (this is dependant on the time that the last latest server's app pool was restarted).
+ The Executive is determined by file lock (.lck) file, theoretically there should only be one of these.
+ If there is only 1 server in the cluster, then obviously it is the Executive.
+
+
+
+
+ Fired every 10 minutes by the timer object. This timestamps the EXA file to
+ enure the system knows that this server is active.
+ This is to ensure that all systems in a Load Balanced environment are aware of exactly how
+ many other servers are taking part in the load balancing and who they are.
+
+
+
+
+
+
+ Creates an xml file to declare that this machine is taking part in the index writing.
+ This is used to determine the master indexer if this app exists in a load balanced environment.
+
+
+
+
+ Creates a lock file for this machine if there aren't other ones.
+
+ returns true if a lock file was successfully created for this machine.
+
+
+
+ delete all old lck files (any that are more than cutoffTime old)
+
+
+
+
+
+ delete all old exa files (any that are more than cutoffTime old)
+
+
+
+
+
+ Get all lck files that are not named by this machines name. If there are any, this means that another machine
+ has won the race and created the lck file for itself. If there is a lck file with the current machines name, then this
+ must mean it was previously the master indexer and the apppool has recycled in less than the hour.
+
+
+
+
+
+ Updates the timestamp for lck file if it exists
+
+
+
+
+ Updates the timestamp for the exa file
+
+
+
+
+ Read the machines EXA file
+
+
+
+
+
+ Read the machines LCK file
+
+
+
+
+
+ This will check for any lock files, not created by the current machine. If there are any, then this machine will flag it's
+ exa file as not being the master indexer, otherwise, it will try to create it's own lock file to let others know it is the race
+ winner and therefore the master indexer. If this succeeds, it will update it's exa file to flag it as the master indexer.
+
+
+
+
+ When the object is disposed, all data should be written
+
+
+
+
+ Ensures there is an elected Executive, otherwise starts the race.
+ Returns a bool as to whether or not this is the Executive machine.
+
+
+
+
+ Returns a boolean determining whether or not this server involved in a LoadBalanced
+ environment with Umbraco Examine.
+
+
+
+
+ Returns the machine name of the executive indexer
+
+
+
+
+ The number of servers active in indexing
+
+
+
+
diff --git a/foreign dlls/UmbracoExamine.dll b/foreign dlls/UmbracoExamine.dll
index 0ec4e94763..81aa1cb60e 100644
Binary files a/foreign dlls/UmbracoExamine.dll and b/foreign dlls/UmbracoExamine.dll differ
diff --git a/umbraco/presentation/config/ExamineSettings.config b/umbraco/presentation/config/ExamineSettings.config
index fae3989530..1b0d9884f5 100644
--- a/umbraco/presentation/config/ExamineSettings.config
+++ b/umbraco/presentation/config/ExamineSettings.config
@@ -12,7 +12,7 @@ More information and documentation can be found on CodePlex: http://umbracoexami