Hi, The MVStore supports multiple maps. To add an index for a map, simply add another map. This is how the H2 database (the relational part of H2 with SQL API) uses the MVStore. Example:
Map<Long, String> customers = ... // key: customer id; value: customer data Map<String, Long> customerByNameIndex = ... // key: customer name; value: customer id You will need to ensure customer names are unique; if they are not, you need to add some token to make them unique (e.g. a random number). And then query using e.g. ceilingKey. Regards, Thomas On Thu, Apr 26, 2018 at 3:26 AM, ivan <[email protected]> wrote: > Sorry, I mean MVStore which is key value feature... > > Thanks > > > On Thursday, April 26, 2018 at 9:23:50 AM UTC+8, Evgenij Ryazanov wrote: >> >> Hello. >> >> What exactly do you mean by second index key? Indexes are not a part of >> SQL standard, but almost all databases have them and many databases have >> very similar syntax. Berkeley's own documentation have SQL examples. >> >> The complete H2's syntax can be found here: >> http://www.h2database.com/html/grammar.html#create_index >> > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/h2-database. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
