on 08-28-2015 12:45 PM
Hi,
I am developing in HANA and trying thiings out with the CONTAINS predicate.
In order to make all things work I defined a full text index on the requested column - this is a NVARCHAR in our secondary database.
If I execute the SQL below, I also get results with a score lower than 1.0. If I replace the FUZZY with EXACT, I get exactly the same effect.
select
distinct score() as score,
ident
from z_estri
where contains( ident,
'ethylene' ,
fuzzy( 1.0 , 'textsearch=compare' ) )
order by score desc,
ident
We want the perfect matches as output, but " WHERE IDENT = 'ethylene' " does not work, because some records might contain uppercases and in this case the CONTAINS returns them all with a perfect score.
If I use FUZZY( 0.9 ) I also get the lower scores in my result.
Can anyone tell me how I can get the correct result.
Thanks a lot.
Kris
Well, I can't offer an answer to your question, but perhaps a workaround for your problem.
If you need all occurrences of 'ethylene', no matter which case, the classical approach will be:
WHERE LOWER(IDENT) = 'ethylene'
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.