You may find it useful to specify a default value for certain indexed properties. For example, suppose you are indexing address data, and for some addresses no value appears in the repository for the city property. In these cases, you could set the property value in the index to be “city unknown.” A user could then search for this phrase and return the addresses whose city property is null.

To set a default value, you use the default-value attribute of the property element. For example:

<property name="city" type="string" text-searchable="true"
default-value="city unknown"/>

Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved.

Legal Notices