duckduckgo / zeroclickinfo-fathead

DuckDuckGo Instant Answers based on keyword data files
https://duckduckhack.com/
Other
318 stars 365 forks source link

NodeJS Bug: not triggering for some articles #511

Closed MariagraziaAlastra closed 7 years ago

MariagraziaAlastra commented 7 years ago

Description

A lot of the docs articles don't trigger. E.g. searching for "node dns lookupService", "node child disconnect", and "node http message service" don't show a NodeJS result. Investigate why.

Steps to recreate

Get Started

Resources


Instant Answer Page: https://duck.co/ia/view/node_js

itai421 commented 7 years ago

I can take a look at this

itai421 commented 7 years ago

This is what I did so far:

At first, I took a look at the "Steps to recreate":

Than I tried to add a redirects.txt as mention at the docs but when running it using duckpan it did not seem to work - even a test redirect foo to childprocess.disconnect did not do anything.

Honestly, I do not know what to do next, since I could not identify the problem, and I failed using the redirects.txt file, any ideas?

pjhampton commented 7 years ago

Hey @itai421,

Can you please push an early PR to create an ongoing to discourse?

itai421 commented 7 years ago

Hey @pjhampton, Unfortunately, I don't have anything to push, since, as mentioned in my comment, I did not know what to do...

pjhampton commented 7 years ago

Hey @itai421,

Sorry for the late reply. The previous PRs have not improved the coverage for this Fathead. We need to create better redirects as Maria has pointed out. From my analysis of the unanswered query data, I have found that:

Triggers: node http.agent
Doesn't Trigger: node http agent

Triggers: node http
Doesn't Trigger: node http module

Triggers: nodejs crypto
Doesn't Trigger: node js crypto

The first two can be added as redirects in the cover/redirects.txt file, the third can be covered in triggers.txt. You can see an example here https://docs.duckduckhack.com/programming-mission/creating-effective-fatheads.html#using-a-redirectstxt-file

The duckpan server doesn't currently work with a redirects.txt file. The whole cover directory is ignored (as far as I know). The redirects.txt file is only useful in production.

itai421 commented 7 years ago

O.K, good to know, I'll see what I can do

itai421 commented 7 years ago

Do you want me to push work in progress?

pjhampton commented 7 years ago

Sure, sounds good!