valeriansaliou / sonic

🦔 Fast, lightweight & schema-less search backend. An alternative to Elasticsearch that runs on a few MBs of RAM.

Home Page:https://crates.io/crates/sonic-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

search ordering seems to be odd sometime...

yangzh opened this issue · comments

Hey:

Thanks for bringing this great piece of software, I tried and most of time it just works.

However, I noticed occasionally something is off, for example,

Query for "schizophrenia" (NOTE the query is all lower-case):

I got the following top 20 response from the index:

00: 'Schizophrenia relapse'
01: 'Schizophrenia-like symptoms'
02: 'Schizophrenia, Latent'
03: 'Schizophrenia, Pseudoneurotic'
04: 'early onset schizophrenia'
05: 'FH: Schizophrenia'
06: 'Chronic disorganized schizophrenia'
07: 'Schizophrenia, process'
08: 'Schizophrenia, Childhood'
09: 'SCHIZOPHRENIA EPISODIC'
10: 'Chronic schizophrenia'
11: 'Incipient Schizophrenia'
12: 'Simple schizophrenia NOS'
13: 'Chronic paranoid schizophrenia'
14: 'Schizophrenia'
15: 'Late onset schizophrenia'
16: 'Chronic residual schizophrenia'
17: 'mixed schizophrenia'
18: 'Paranoid Schizophrenia'
19: 'Schizophrenia, Disorganized'

Ideally I would see "Schizophrenia" (at #14) to be the top response, as it's almost identical.
However, it's NOT the case. To make things worse, if I limit the top 10 response, this won't appear in the response.

I may be new to sonic, but if you can help me diagnose (or provide any suggestion how to work around it), it would be great.

I'm happy to provide additional details if needed. Thanks!

Kevin Yang.