Skip navigation

JSI Tip 3102. How do I add an attribute to ANR indexing?

Ambiguous Name Resolution (ANR) is an Active Directory search algorithm that makes searching the AD easier.

The default attributes that ANR indexes are:

You can add attributes to the ANR index by setting their searchFlags property.

In order to modify the schema, see tip 2645.

To modify the searchFlags property of an attribute:

1. Logon to the Schema FSMO domain controller as a Schema Administrator. Microsoft recommends that you do NOT transfer the FSMO role to accomplish this.

2. Run Adsiedit.

3. Navigate to the Schema object and expand it to see the entire DN of the Schema container.

4. Select the Schema container and right-click the attribute you want to index (in the right hand pane).

5. Press Properties.

6. Select the Attributes tab.

7. Press searchFlag in the Select a property to view list.

8. In the Edit Attribute box, type a 5 and press Set. The searchFlags are generated by adding the following bits:

1 = Index over attribute only.
2 = Index over container and attribute.
4 = Add this attribute to the ANR set (used in conduction with bit 1).
8 = Preserve this attribute on logical deletion (make attribute available on tombstones).
NOTE: To preserve an attribute when it is deleted, and also ANR index it, set the value to 13 (1 + 4 + 8). You might wish to do this with the userPrincipalName attribute.

NOTE: Making a mistake while modifying the Schema can render your system unusable.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.