GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Indices are always unique (unique parameter is ignored on creation) · Issue #553 · ArcadeData/arcadedb

Indices are always unique (unique parameter is ignored on creation) #553

New issue
Copy link
New issue
Copy link
Closed
Closed
Indices are always unique (unique parameter is ignored on creation)#553
Copy link
Assignees
lvca
Labels
invalidThis doesn't seem right
Milestone
23.1.1

Description

@nicolaiwadstrom
nicolaiwadstrom
opened on Oct 7, 2022
Issue body actions

ArcadeDB Version: <version here, you can find it on the first line of server output>

JDK Version: Oracle "18.0.2" 2022-07-19

OS: MacOS 12.6

Expected behavior

An Index would be unique only when the boolean parameter "unique" in the function call is set to true (when creating an index.

Actual behavior

Indices on vertices and edges are always unique

Steps to reproduce

com.arcadedb.schema.VertexType vertexTypeRoot = db.getSchema().getOrCreateVertexType( "VertexType"  );
vertexTypeRoot
	.getOrCreateProperty( "_tranid_", String.class )
		.getOrCreateIndex( com.arcadedb.schema.Schema.INDEX_TYPE.LSM_TREE, false );	

Activity

  1. lvca
    self-assigned this
    on Oct 7, 2022
  2. lvca
    added a commit that references this issue on Oct 7, 2022

    Updated test case for issue #553

    2b4f48c
  3. lvca commented on Oct 7, 2022

    @lvca
    lvca
    on Oct 7, 2022
    Member
    More actions

    How do you see they are always unique? Could you please provide the output from the API? You could also use the console with select from schema:indexes.

    We have this test and I checked the index was not unique and it was:

      @Test
      public void testQueryMetadataIndexManager() {
        DocumentType type = database.getSchema().createDocumentType("testQuerySchema");
        database.begin();
        type.createProperty("name", Type.STRING).createIndex(Schema.INDEX_TYPE.LSM_TREE, false);
        database.commit();
        ResultSet result = database.query("sql", "select from schema:indexes");
        printExecutionPlan(result);
    
        while (result.hasNext()) {
          Assertions.assertTrue(result.hasNext());
          Result item = result.next();
          Assertions.assertNotNull(item.getProperty("name"));
          Assertions.assertEquals("STRING", ((List<String>) item.getProperty("keyTypes")).get(0));
          Assertions.assertFalse((Boolean) item.getProperty("unique"));
        }
        Assertions.assertFalse(result.hasNext());
        result.close();
      }
  4. lvca
    added
    invalidThis doesn't seem right
    on Oct 7, 2022
  5. lvca
    added this to the 22.10.1 milestone on Oct 7, 2022
  6. nicolaiwadstrom commented on Oct 7, 2022

    @nicolaiwadstrom
    nicolaiwadstrom
    on Oct 7, 2022
    Author
    More actions

    Forgot to add version, this was tested with ArcadeDB 22.9.1

    Here is a screenshoot from the Console:

    image

  7. nicolaiwadstrom commented on Oct 7, 2022

    @nicolaiwadstrom
    nicolaiwadstrom
    on Oct 7, 2022
    Author
    More actions

    Very odd, using select from schema:indexes from the console it shows unique to be false across all of the created indices..

    What is interesting is that I do get an exception (Duplicate key on index) when inserting new vertices when the property is not unique for the tranId property

    Maybe the index problems have to do with using super type relationships (there is a parent type vertex that have defined properties and indices), and the operations are done on the sub types?

  8. lvca commented on Oct 13, 2022

    @lvca
    lvca
    on Oct 13, 2022
    Member
    More actions

    @nicolaiwadstrom how can I reproduce it? Could you please provide a set of SQL commands or a java code so we can create a test case based on it? Thanks in advance.

  9. lvca
    modified the milestones: 22.10.1, 22.11.1 on Oct 24, 2022
  10. lvca
    modified the milestones: 22.11.1, 22.12.1 on Dec 7, 2022
  11. lvca
    modified the milestones: 22.12.1, 23.1.1 on Dec 23, 2022
  12. lvca commented on Jan 16, 2023

    @lvca
    lvca
    on Jan 16, 2023
    Member
    More actions

    No response from the author for a while, closing the issue.

  13. lvca
    closed this as completedon Jan 16, 2023
  14. mergify
    added a commit that references this issue on Apr 26, 2026

    chore(studio-deps-dev)(deps-dev): bump enhanced-resolve from 5.20.1 t…

    53ad983
  15. tae898
    added 2 commits that reference this issue on Jun 28, 2026

    Updated test case for issue #553

    3e47829

    chore(studio-deps-dev)(deps-dev): bump enhanced-resolve from 5.20.1 t…

    e5d5511
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @lvca
    lvca

Labels

invalidThis doesn't seem right

Type

No type

Projects

No projects

    Milestone

    • 23.1.1

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.