on 06-12-2016 6:20 AM
Hi Team,
As you guys know regular expression is available in hana now, which is very powerful feature for search. Is there a way to search using regular expression over CLOB or NCLOB datatype? i know in Hana documentation it is mentioned that regular expression doesn't support search over CLOB or NCLOB, but is there a way to cast it or some other format where i can use it?
Your help is highly appreciated.
Thanks,
Akshay
If your use case is not tightly bound to using REGEX, you might want to look into the full text search features. Other than that, there is no (well performing) way to run REGEX against the contents of a CLOB column. Casting to strings can only work in the boundaries of what a VARCHAR data type can hold, which is less than what could be stored in the CLOB column.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If the use case demands using REGEX like search, One of the ways is to create the FULL Text Index using CGUL rules over the Clob column and then use CGUL rules (similar to REGEX ) to create a custom dictionary . Which you might have to take a decision keeping the maintenance of the index as well
Regards,
Krishna Tangudu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To add, Not sure about your use case . But do have a look on this document,
SAP HANA:  Using Custom dictionary with CG... | SCN
You could probably create a full text index like this and with the help of CGUL rules you can implement the Regex over the CLOB column data and then store only the data of interest in the index. You might also want to think about the maintenance while going for this approach.
Let me know on how you proceed and do share your use case if possible
Regards,
Krishna Tangudu
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.