Kunal
Kunal

Reputation: 43

How to create index for Column that contain alphanumeric record in orientDb

I have a string datatype column that contain alphanumeric data in orientDb.

When I create an index on it I get an error that property is not compatible with data type string .

How can I create an index for the following type of record:

34058
34034
340XX
34042
34030
857XX
34041
98087
90044
73160
9630
9112
9354
9855
9841
093XX
098XX
097XX
9049
9620
9366

Upvotes: 0

Views: 63

Answers (1)

Michela Bonizzi
Michela Bonizzi

Reputation: 2632

I tried your example and it works for me. This is my structure:

enter image description here

I've executed this command:

CREATE INDEX index_on_column ON Column (alpha) NOTUNIQUE

the index has been created correctly:

enter image description here

Hope it helps.

Regards

Upvotes: 0

Related Questions