Home » Support » Forum » Index on values from a Map

Index on values from a Map

#1

Hi,

is there a way to put an Index on the values from an Map? For example, if I have a Map like this:

private Map<String, TemplateModel> mmsContainer

and I want to access it fast in following way:

Collection<TemplateModel> values = mmsContainer.values();

 

Thanks for you help

 

#2

Indexes are used only in queries, and cannot accelerate other application code.

You can define an index on a map value. Due to this issue using maps in queries is not fully supported yet, but queries on map values should work. Hopefully indexes are used in this case (if not, it should probably be fixed).

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply

To post a reply and/or subscribe to update notifications - please login