You probably need to do that in your application layer. You can totally hide fields from the user depending on the roles this user has. This requires a platinum commercial license though.
You can at index time replace the value by a fingerprint though. That could May be solve your use case.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.