question

Upvotes
Accepted
16 5 7 12

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>

#technology#contentrdp searchcompany-research
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

cc'ing @Jirapongse
Upvote
Accepted
6.2k 18 2 8

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


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
16 5 7 12

Hi @aramyan.h , many thanks for the help. Actually I could not figure out where to look for the OrderBy in the Reference Guide link you sent. Still I could see from intellisense in CODEBK that we are talking about the order_by parameter. This works. A relevant question: I am using this search to get down to financial data info (revenues for public/private companies) etc: is there a way to get to the ParentOAPermID and from there to the financial data, again starting from a (fuzzy) Company Name? Thanks

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @grigorios.mamalis , you can add ParentCompanyOAPermID into your select statement under the Search query.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.