If you are using Derby database (the default database installed with Aware IM), then you can use function CHARS_FROM_LEFT in queries to limit a search to the first 9 characters of existing attribute values, for example:
FIND Person WHERE CHARS_FROM_LEFT(Person.IdentityNumber, 9) = ?'Identity number'
To check that a specified text is found anywhere within an existing attribute value you can use condition CONTAINS instead of "=", for example:
FIND Person WHERE Person.IdentityNumber CONTAINS ?'Identity number'
Queries that use CONTAINS will work with any database supported by Aware IM.