Forum Stats

  • 3,770,440 Users
  • 2,253,113 Discussions
  • 7,875,456 Comments

Discussions

Is it possible to match a substring key in an berkleydb-je index ?

3480917
3480917 Member Posts: 4
edited Jun 6, 2017 2:37PM in Berkeley DB Java Edition

Hello all,

I use BDB JE 4.1.10.

Is it possible to do a substring comparison on a key on an index in berkleydb-je ?

Here's my Entity definition

    public class Entity {

   

    @PrimaryIndex

    Long id;

   

    @SecondaryIndex(relate = Relationship.MANY_TO_MANY)

    List<String> values;

   

    }

In SQL terms, I'd like to run a LIKE Query on the values list. %search_key%

Berkley DB XML seem to have a Substring Key Type.

Key Types (equality, presence, substring)

http://manual.freeshell.org/dbxml/ref_xml/xml/index.html

Is there an equivalent in BerkleyDB JE ?

Thanks!

Answers

This discussion has been closed.