Is it possible to have a text field annotated with @Text generate a search index without storing the actual text in the cache?
I have a text field in my cached object which holds a concatenation of other fields of the same object, such as number ids and local dates. The other fields are parsed and formatted as text before concatenation. The resulting text field is being used solely to provide a search index. Therefore, I'd like to save some memory by not storing it. The type of the cached object is similar to the following.
@Proto
@Indexed
public record CachedMessage(
@Basic long userId;
@Basic long messageId;
@Basic long creationDate;
@Basic long readingDate;
@Text String text; // concatenation of the other fields
)
nice question! At the moment for distribution reasons we don't support removing data from caches keeping it only on the indexes. It would be nice to support this case eventually. Feel free to open an issue here: https://github.com/infinispan/infinispan/issues