I add a custom computed field to the fieldmap node in the Lucene Search config like so:
<fieldNames hint="raw:AddFieldByFieldName">
<field fieldName="my_field" indexType="UNTOKENIZED" returnType="stringCollection" />
</fieldNames>
I also registered my custom computed field like so:
<fields hint="raw:AddComputedIndexField">
<field fieldName="my_field" indexType="UNTOKENIZED" returnType="stringCollection">MyAssembly.MyField,MyAssembly</field>
</fields>
After saving and building the solution I got this error when logging into Sitecore:
contextDatabase
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: contextDatabase
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidOperationException: contextDatabase]
Sitecore.Forms.Core.Dependencies.DefaultImplItemRepository..ctor(Database contextDatabase, Database masterDatabase) +103
Further Information: Sitecore 8.2 update 6.