Inconsistent scores with CompanyTypeAhead

37 views
Skip to first unread message

Jérémie Gomez

unread,
Mar 5, 2013, 1:51:33 PM3/5/13
to cleo-ty...@googlegroups.com
Hi,

I am using cleo with cleo-primer and I use the REST API both to add elements to the index, and to search them later. I stumbled across an annoying problem that I can't seem to figure out : the score associated to each element seems inconsistent.

It goes like this :
1. I start the server with no data first.
2. I use a script to add all my elements via the rest api.
3. When I test the autocomplete, the elements I attributed the highest score to appear first, great.
4. I shut the server down and restart it.
5. When I retest the autocomplete, it seems all my scores are gone. In the response I get from the API, all my elements have a score of 1.0E-7 that I never gave.

Does anybody have an idea of why the scores are modified after I restart the server ?

Thanks a lot !
Jeremie

Jérémie Gomez

unread,
Mar 13, 2013, 5:55:08 AM3/13/13
to cleo-ty...@googlegroups.com
Hi,

I realized my scores were 1.0E-7 because cleo can't find my scores, so it gives the minimum possible score. So I went further and realized that when I ctrl+C the server, cleo sends an exception when trying to persist to disk. However, I could not figure out why this exception is thrown, so I am still in the dark.

If anyone thought about anything, it would still be very welcome :)

Thanks
Jeremie

Jingwei

unread,
Mar 13, 2013, 1:28:21 PM3/13/13
to cleo-ty...@googlegroups.com
Hi Jeremie,

I took a look this morning and found the problem. By default, cleo-primer does not set up an additional element score file to override element scores. The caused that the scores of elements are reset to a minimum value upon restart. I have fixed this issue and released cleo-1.2.6-1 to maven. It may take a day for this artifact to show up in maven repository.

You can get the latest change of cleo from https://github.com/jingwei/cleo.git and build the artifacts locally. Or wait until this afternoon or tomorrow morning.

Thanks.

Jingwei

Jérémie Gomez

unread,
Mar 13, 2013, 8:39:58 PM3/13/13
to cleo-ty...@googlegroups.com
Hi Jingwei,

Wonderful, it works perfectly now ! I'm happy to be able to stick to Cleo for my autocomplete needs :)

Thanks a lot indeed !
Jeremie
Reply all
Reply to author
Forward
0 new messages