question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Random results from search query

See original GitHub issue

I’m attempting to do to a basic query with a dictionary of over 1000 merchants. For many of my queries, I get results which just seem to be wrong.

Query: BIKKURIJAPANESE RESTAURATORONTO ON

My options:

var options = {
  shouldSort: true,
  includeScore: true,
  includeMatches: true,
  threshold: 0.03,
  location: 0,
  distance: 10,
  maxPatternLength: 100,
  minMatchCharLength: 8,
  keys: [
    "merchant_name"
  ]
};

My example dictionary:

[
    {
    "merchant_name": "FINN AIR",
    "category_code": 5260,
    "master_code": "Business_Expense"
  },
  {
    "merchant_name": "AER LINGUS",
    "category_code": 5260,
    "master_code": "Business_Expense"


  },
  {
    "merchant_name": "AIR LANKA",
    "category_code": 5260,
    "master_code": "Business_Expense"
  }
 ]

My result:

[
  {
    "item": {
      "merchant_name": "FINN AIR",
      "category_code": 5260,
      "master_code": "Business_Expense"
    },
    "matches": [],
    "score": 0.029411764705882353
  },
  {
    "item": {
      "merchant_name": "AIR LANKA",
      "category_code": 5260,
      "master_code": "Business_Expense"
    },
    "matches": [],
    "score": 0.029411764705882353
  }
]

Why is my query matching FINN AIR if they do not seem to be similar at all? How can this be with a high threshold of 0.03? Lastly, are minimum character length, location, and threshold being overwritten by threshold? If not what role are they playing in this case?

Thanks for your help!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
danielfdickinsoncommented, Mar 25, 2020

Oops sorry for the noise.  I though this was  new issue but I see it’s a comment on an old (detailed) one.

On 2020-03-25 13:07, Akos Kitta wrote:

Query: |BIKKURIJAPANESE RESTAURATORONTO ON|

|“BIKKURIJAPANESE RESTAURATORONTO ON”.length === 34|

Search over 32 chars gives back whole set https://github.com/krisk/Fuse/issues/254 issue?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/krisk/Fuse/issues/320#issuecomment-603965609, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE6GOSWYLDNPN3IHSNBI7C3RJI24XANCNFSM4IGIIT2Q.

0reactions
kriskcommented, May 4, 2020

Closing this issue, as there hasn’t been any update.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How Do I Randomize the Results of a Search?
Click Search > New Search. Under the Message tabs, add Content, People, and Keywords to be searched. User-added image. Review the Random Results...
Read more >
Search random google query every 30 minutes
I am looking to search a random google query every 30 minutes (e.g. https://www.google.com/?q=OjRfujaM). I need to search this without ...
Read more >
How to get 3 random search results in elasticserch query
I have my elasticsearch query that returns record between the range of publishedDates: { query: ... this query to return 3 random search...
Read more >
Getting Random Results (On Purpose) - Google
Adding a touch more randomness ... The tip, as it stands, always picks the first result. While its already highly unlikely you'll ever...
Read more >
MySQL Select Random Records
This tutorial introduces you to some techniques to select random records from a database table in MySQL.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found