The Exchange 2007 Wiki

Exchange Search FAQ

What is Exchange Search?

Exchange Search is a feature that enables fast searching of text in messages through the use of pre-built indexes. It was first introduced in Exchange 2000, and has been completely re-engineered in Exchange 2007.
Exchange Search uses the Microsoft Search indexing engine, and creates the initial index by “crawling” all messages in mailboxes moved into an Exchange 2007 database, and updates this index based on notifications from the information store as new messages arrive.

 How does Exchange Search differ from Store search?

  • Exchange Search is based on Words, phrases and sentences, while Store search is based on a stream of bytes. This means Exchange search will ignore punctuation and spaces, and is also case insensitive while Store search will only find an exact match of all characters. For example, a search for “this phrase” would match
  • Exchange Search uses its full-text index to find matches, while Store search does a serial scan of every message in the entire folder or mailbox being searched. So typically Exchange Search is orders of magnitude faster than Store search.
  •  “This  ;/.;,  Phrase”  when using Exchange Search, but not with Store search.
  • Exchange Search will search in attachments types supported by the installed Filters, while Store Search does not search in attachments.
  • Exchange Search only supports “Content” type searches while Store search supports the full set of MAPI restrictions which can include non-text property types like date-time.
  • Exchange search does a “word-prefix” match by default, while Store search does an exact Substring match by default when processing queries from OWA or Outlook clients. What this means is that when searching for the word “fall”, exchange search will find the words “fall” and “fallthrough”, but not “waterfall”, whereas Store search will find all three words in the message. However, if a prefix match is explicitly specified as part of the query passed to Store search, it will only find property-prefixes and not word-prefixes, so it will not find “fall” if the property being searched contains “It was a fallacy”.
  • Exchange Search is fully localized while Store search is not language aware, being just a byte-stream match. So users may experience more noise in the results returned from Store search for languages other than US English. For example the Japanese representation for “Japan” contains 2 characters, one which independently means “book” and one that independently means “day”. Searching for the word that represents “day” will also find the word that represents “Japan” using Store search, because the byte stream will match the exact substring, while Exchange search is language-aware and will not find the word for  “Japan”.

How does Exchange Search in Exchange 2007 improve upon previous versions?

  • Much less Resource hungry than previous versions: Exchange Search has gone though several improvements to optimize utilization of system resources such as CPU, Memory, Disk I/O and Disk space required for its indexes.
  • FAST! Exchange Search can typically index new messages within 10 seconds of arrival, and return query results within seconds. So in most cases, if you start typing a query the moment you see a message arrive in your inbox, Exchange Search will be ready to find text in that message by the time you are done typing!
  • Auto Configured: Exchange Search is enabled out of the box, and Administrators don’t need to spend any time configuring it for first use.
  • Attachment Search: Support for attachments is new in Exchange 2007. Several attachment types are supported (Office docs, text, html, etc.)
  • Throttling: Exchange Search automatically backs off indexing for a particular MDB or set, thereby reducing the Disk I/O load due to search, or for the entire Mailbox server, which reduces both Disk I/O and CPU utilization for Exchange Search..
  • Client improvements: Easily accessible search bar in OWA 2007 and Query builder support in Outlook 2007

How do I Enable/Disable Exchange Search?

  • Exchange Search is enabled by default on all new Mailbox Databases – No admin action is required
  • To disable Exchange Search on a single Mailbox Database, run the following command in an Exchange Management Shell window:

Set-MailboxDatabase <name> -indexenabled:$false

  • To disable Exchange Search on an entire Mailbox Server, stop the “Microsoft Exchange Search Indexer” service from the command-line or service control manager.

CAVEAT: Disabling Exchange Search will visibly impact both the functionality and performance of text searches as experienced by end-users. For instance, OWA users will the following prompt when they access the search bar - “Search results may take a long time to appear because Exchange search is unavailable. Results will not include matches in the message body”.

 How do I find out if Exchange Search is working for a particular Mailbox user or enabled on a Mailbox Database?

  • To test whether Exchange search is working for a particular user’s mailbox, run the following command (needs perms to write to the mailbox)

Test-ExchangeSearch <mailbox name>

  • To see which Mailbox databases are enabled for Exchange Search, run the following command:

Get-MailboxDatabase |select name, indexenabled

Under what conditions will Exchange Search be invoked?

  • All Searches in OWA will use Exchange Search if the Microsoft Exchange Search service is running on the Mailbox Server, and the Mailbox database has the “Indexenabled” attribute set to $true. If either of the above is not true, OWA will fall back to Store search, with one additional restriction – results will not include matches in the email body.
  • Outlook 2000 and Outlook 2003/2007 in online mode will invoke Exchange Search on the Mailbox Server if the following conditions are met:
  1. Microsoft Exchange Search service is running on the Exchange Mailbox Server
  2. The Mailbox Database has “IndexEnabled” attribute set to $true
  3. The Search Query includes text fields that are indexed by Exchange Search (most commonly used text fields are indexed)
  4. When a CONTENT restriction is passed in which satisfies the “AND”, “OR” and “NOT” rules
    •  
      •  
        • Simple AND queries where at least one leg contains a Exchange Search-indexed attribute can use Exchange Search (eg)
          • AND
            • Subject contains “foo”
            • Sent Date = “08/30/2006”
        • Simple OR queries where at least one leg contains an attribute that Exchange Search doesn’t index, cannot use Exchange Search (eg)
          • OR
            • Subject contains “foo”
            • Received Date > “08/15/2006”
        • Anything below a NOT query cannot use Exchange Search, including AND and OR restrictions

5. If the above conditions for Exchange Search to be used are not met with Outlook 2000 and Outlook 2003/2007 in Online mode, Store search is used instead to scan the entire folder/mailbox. This will result in a case-sensitive byte-stream search, which will not find text inside attachments, and may be much slower to return results.

NOTE: When Outlook 2007 is in cached mode, neither Exchange Search nor Store search is invoked – the entire search is handled by the Outlook client using Windows Desktop Search. In Outlook 2003 in cached mode, the client does a linear scan of every message, similar to what Store search does on the server side.

 How can I set my Outlook profile to Online mode?

  • Outlook 2003: Tools  → Email Accounts → Change existing accounts → Change  → UnCheck “Use Cached  Exchange Mode”
  • Outlook 2007: Tools → Account Settings → Change (select Microsoft Exchange Server) → Change → UnCheck “Use Cached Exchange Mode”

Is the indexing engine for Exchange 2007 Search built on the same architecture as SharePoint 2007?

Yes & No. SharePoint 2007 uses the Microsoft Search 3.0 technology with some modifications as well as functionality carried forward from Sharepoint Portal Server 2003. Exchange 2007 uses Microsoft Search 3.0 technology for indexing and search, as does SQL Server 2005.

Can I control which file types are included in the index and how do I check which ones are being included?

Yes, the file types included in the index are those for which appropriate filters have been installed on the exchange mailbox server, and for whose file extension a registry key exists under the following location: HKLM\Software\Microsoft\Exchange\MSSearch\Filters\
If you want to remove specific file types from indexing, just delete the keys corresponding to that file extension (eg) .pps, from the above location.
There are also third party tools available to visualize all the iFilters installed on your computer, such as IFilter Explorer

Are the file types extensible?

Yes, new iFilters can be written to enable indexing and searching of file types not supported by default, and integrated with Exchange search. After installing the new IFilter on your Windows machine, you will need to complete the following steps before Exchange Search can start picking it up to index and query on the new file type:

  • Identify the CLSID for the filter. You can do this by searching for the name of the filter (say “PDF Filter”) in registry under HKeyClassesRoot\CLSID\ . You can also use a 3rd party tool like IFilter Explorer to do this.
  • Create a new key under HKLM\Software\Microsoft\Exchange\MSSearch\CLSID\

With the name of this CLSID, and a default value which points to the full path to the Filter dll file

  • Create a new key under   HKLM\Software\Microsoft\Exchange\MSSearch\Filters

And name it after the file extension the filter will index (eg) .pdf

  • Enter as the default value for this key the same CLSID you identified in Step 1.
  • You may have to cycle the “Microsoft Exchange Information Store” and “Microsoft Exchange Search Indexer” Services for this change to take effect.
  • Once this is done, you will be able to index and query for text inside documents of the new file type. Please Note that this will not index documents of the new file type that existed in the store before the new filter was installed. In order to be able to search within these documents also, you will need to recreate the indexes for that mailbox database.  You can do this by running the script titled “ResetSearchIndex.ps1” under your $exscripts directory from an Exchange Management Shell window.

CAVEAT: Exchange is only supported in production on 64-bit platforms, and at this time, we are not aware of any vendors providing 64-bit capable iFilters.

 What happens when a user mailbox is moved between Mailbox Databases or Servers?

Catalog files are Not included in mailbox moves. The mailbox will be crawled after it is moved into the target mailbox database/server, provided Exchange Search is running on the Server and enabled for the Database.

 Are Public Folders indexed by Exchange 2007?

No

What about Cross-Mailbox Searches? Is it possible to produce a report of messages satisfying certain filters across multiple mailboxes without moving mail to a target mailbox?

You can perform cross-mailbox searches using the ‘export-mailbox’ Exchange Management Shell command, but in the current release, we only support storing the search results in a target Mailbox. Also note that the Target Mailbox will not be included in the search. For the full syntax for export-mailbox, type “get-command export-mailbox| fl” from an Exchange Management Shell window

What is the granularity of index files (Storage Group/ Server/Other)?

There is one catalog directory created with multiple index files under it for each Mailbox Database that is enabled for Exchange Search (the indexenabled attribute is set to $true for that Database and Exchange Search is running on that Mailbox Server)

 For sizing purposes how much disk space would you allocate for the indexes?

Typically, indexes occupy around 5% of the total Mailbox Database size, so it should be safe to allocate 10% of the total Mailbox size for the indexes.

Can you control where the index files are created?

No, the index catalog directory is co-located with the Mailbox Database files (*.edb) in the same folder. You can find this path for your Mailbox Databases by typing the following command in the Exchange Management shell:

Get-mailboxdatabase |select name, edbfilepath

  What protocol is used by OWA and Outlook clients to talk to the Mailbox Server and consume the index?

OWA & Outlook clients use MAPI (Messaging API) over RPC to communicate with the Mailbox Server.


Can I use Web Services to perform searches on an Exchange 2007 Mailbox?

Yes. For further details on how to accomplish this, check out the Web Services Reference for Exchange 2007 available on MSDN. In order to perform searches on mail, you need to use the FindItem call.

What is the story for Exchange Search in High Availability, Backup & Restore and Disaster Recovery Scenarios?

The following table illustrates the Exchange Search behavior for various scenarios:

Scenario

Description

Exchange Search Action

Backup

VSS & Streaming Backup

Re-index triggered upon Restore

Offline Backup

Catalog data can be backed up/restored with MDB

 Fast Recovery  

Dial-Tone Recovery (populate empty MDB, reuse MDB from RSG)

Fresh index created for empty DB, re-index triggered for reused DB

Portable Database (copy files, mount MDB on another server)

Re-index triggered upon restore

Local Copy Replication(LCR)

Log shipping is done to an unmounted backup of the MDB on same or different server

Switch over to the backup MDB will trigger a re-index

Clustered Copy Replication(CCR)

Switch to passive node with Shared Nothing cluster

Both servers have active catalogs building against active MDB node. Exchange Search will just work after failover. For Lossy failovers, Exchange Search will work just fine as long as the loss duration is less than 7 days.

Switch to passive with Shared Copy cluster

Only active node is indexing. After failover, Exchange Search starts on new node and refers to shared catalog.

Moved from Ask a Question page:

Q: How can I enable Exchange Search on a CAS Server? The CAS Server is seperated from the mailbox server role! 

A: Exchange search is a component of the Mailbox role, and its current design is to index the mailboxes of the server that has the role installed.  You could install the mailbox role on the Client Access server, but then you could only index the mailboxes that resided on the client access server. If you access your mailbox via OWA on the Client Access server, you will still see the benefits of Exchange Search. In short, you can’t enable Exchange Search on a CAS-only server, but there wouldn't be anything for it to index there even if you could.

Q: Thanks, but that means, in case I want to use the Exchange Server Search possibilities I have to combine this two roles together? How do I make them HA? CAS Server isn´t Cluster able (e.q. CCR, SCC...)

A: Not at all. CAS doesn't store any mailbox data so there's nothing to index there. Just enable search indexing on the mailbox store and it'll be available through OWA (ie - CAS).

Q: The Problem is, that search indexing on my Exchange Server is implemented, but the search functionality doesn´t work, did I something wrong? Do I need special ports? I did the configuration like the manual said! Probably the search indexing does not work on a SCC?

A: There are troubleshooting steps for Exchange Search in Exchange 2007 help that should be useful for this problem. One can download the help file from http://www.microsoft.com/downloads/details.aspx?FamilyID=555f5974-9258-475a-b150-0399b133fede&DisplayLang=en and then search in the index for 'Search Indexer' there's an entry called: “How to Diagnose Exchange Search Issues”.  Here is the specific TechNet link.  There is all the relevant information which should help you get this indexing working.  

Q: We have Exchange 2007 SP1 and the message search feature seems to have some issues. The search drop down has only "This Folder" in blue. This Folder and All Subfolders (is greyed out). All Folders and Items (is greyed out). From searching online I noticed that "Default Location" should be there and it's not. How do I fix this?
A: Please see the following docs and let me know if these helped!

Q:  Searching emails on the Exchange server does not work properly. Every Mailbox has set indexenabled=true. Exchange Indexer is running - it has created index catalogs, but catalogs are small (129 kb) doesn't grow and searching doesn't work. Test-ExchangeSearch for each mailbox returns -1. What's wrong?  
A: Try stopping the search service (msexchangesearch) and deleteing the catalog folder (and all its contents), then restart the search service. There is another method..check http://technet.microsoft.com/en-us/library/aa995966(EXCHG.80).aspx for the steps to rebulid.

Site

Changes
Index
Search

 

User

 

Log In
Register

 
 

Last Modified 3/11/08 8:27 AM