Ok, I think there's something wrong with the regular expression syntax. I've tried the following query: SELECT DISTINCT(pid) FROM App WHERE symbol MATCHES '(^B\\d.*)' OR symbol MATCHES '^..5.*' Which gives me the expected results: 2 3
In fact I can't understand why you have the [[:<:]] in your pattern, since you don't have any symbol starting with those characters, maybe you forgoto a star (*) operator? Please remember that the Orient REGEX syntax is the one defined for Java ( http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html) which may be different from MySql one. Note that, as far as I know, REGEX operations doesn't benefit form indices, hence if this is your only query I would suggest to remove them. Cheers, Riccardo 2014-08-20 16:53 GMT+02:00 'Curtis Mosters' via OrientDB < [email protected]>: > Sure id should be unique, so it's just not a good name for it. You are > right. > > But testing your query give me also am* empty result* =( > > FYI: > > - symbol is FULLTEXT_HASH_INDEX > - id is NOTUNIQUE_HASH_INDEX > > Does that matter? > > Because of the Indexes, please let's > > SELECT appln_id FROM Application WHERE ipc_class_symbol CONTAINSTEXT > 'B62D' AND ipc_class_symbol CONTAINSTEXT 'B60' > > Runs much faster. > > -- > > --- > You received this message because you are subscribed to the Google Groups > "OrientDB" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
