Skip to Content

Lower scores also output with HANA Fuzzy Search

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Aug 28, 2015 at 12:47 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.