Skip to Content
1
Oct 08, 2019 at 07:11 AM

HANA Contains issue

296 Views

Dear experts,

I feel very strange with an error message telling "feature not supported: CONTAINS is not allowed in such predicate contexts; an OR-ed predicate, stacked column searches, etc may cause it" when executing the following SQL

SELECT DISTINCT sapnotes_key, MAX(SCORE()) AS score FROM "<myTable>" WHERE ( ( ( sapnotes_number = '0001034122' AND release_type <> '9' ) ) OR ( ( CONTAINS((TITLE,CONTENT, SAPNOTES_NUMBER_TEXT),'1034122', FUZZY(1.0), WEIGHT(1.0,0.7,1.0)) ) AND ( ( is_top_solution = '1' ) ) ) ) GROUP BY sapnotes_key ORDER BY score DESC

But after i remove the column "is_top_solution='1'' everything is fine then,

SELECT DISTINCT sapnotes_key, MAX(SCORE()) AS score FROM "<myTable>" WHERE ( ( ( sapnotes_number = '0001034122' AND release_type <> '9' ) ) OR ( ( CONTAINS((TITLE,CONTENT, SAPNOTES_NUMBER_TEXT),'1034122', FUZZY(1.0), WEIGHT(1.0,0.7,1.0)) )) ) GROUP BY sapnotes_key ORDER BY score DESC

Can anyone help give some clue here?

Thanks and best regards,

Alex