Fuzzy name company search

Hi @nick.zincone ,


I am doing a company search based on fuzzy names. Following issue came up with the search namely: say I specify companies "SoftwareONE" , "Accenture". The query below returns results in random order. How to map results back to the companies I specified? (have 20K names). Many thanks. Grigorios

>>>mystr = 'SoftwareONE or Accenture'

>>>res = rd.discovery.search(
view = rd.discovery.Views.ORGANISATIONS,
query = mystr,
top = 1000,
filter = " SearchAllCategoryv2 eq 'Companies/Issuers'",
select = "CommonName,PrimaryRIC, IssueISIN")

>>>res2 = res[res["PrimaryRIC"].isna() == False]

>>>res2
CommonName PrimaryRIC
0 Accenture PLC ACN
1 Softwareone Holding AG SWON.S

and (before the "res2 = res[res" step):

>>>res

CommonName PrimaryRIC

0 Accenture PLC ACN

1 Softwareone Holding AG SWON.S

2 Accenture Global Capital DAC <NA>

3 Phantom Ventures LLC <NA>

4 Accenture Ventures <NA>

.. ... ...

547 SoftwareONE Taiwan Ltd <NA>

548 Softwareone Japan KK <NA>

549 Verein zur Absicherung der Pensionsverpflichtu... <NA>

550 Accenture Australia 2 Ltd <NA>

551 Accenture Capital Inc <NA>

Best Answer

  • aramyan.h
    aramyan.h admin
    Answer ✓

    Hi @grigorios.mamalis ,


    As much as I know and according to the Reference guide in API Playground, the results by default are sorted by score descending, where score comes from a combination of static (baked into the document at loading time) and dynamic (based on the request) components. See below.

    screenshot-2023-10-06-at-152202.png

    So I would advice using the OrderBy parameter to ensure the consistency of return (and perhaps you would need to sort your query names as well ). Hope this helps, and I will let my colleagues you added to post their thoughts as well in case I am missing something.


    Best regards,

    Haykaz

Answers