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.

Show a google search result list for new answer action type "websearch"

See original GitHub issue

Actual Behaviour

currently there is a hard-coded rule inside the app which triggers a web search.

Expected Behaviour

The app shall not decide on itself to perform a web search. It must only react on the actions as given in the actions object. To perform a web search, the actions object may now contain an action with the type “websearch”. In case that such an action appears, use the value “query” inside the action object to get the actual query term for the web search.

The new actions array will probably contain two actions, one with an normal answer type and another with the new websearch type. Both actions must be performed in the same order as given in the actions array

Steps to reproduce it

ask susi the following string: “search for linux distibutions”, or open http://api.asksusi.com/susi/chat.json?timezoneOffset=-60&q=search+for+linux+distributions. You will get an result json with the following actions array:

"actions": [
      {
        "type": "answer",
        "expression": "Here is a web search result:"
      },
      {
        "type": "websearch",
        "query": "linux distributions"
      }
    ]

Use the query object to query the google search result, in this case “linux distributions”. The app shall then show two things:

  • the line “Here is a web search result:” - as taken from the expression object
  • the google search result in the same window

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
chiragw15commented, Dec 7, 2016
1reaction
the-daggercommented, Dec 7, 2016

If querying google for answers isn’t possible, I’d suggest you to have a look at DuckDuckGo’s APIs. https://duckduckgo.com/api They do have open sourced APIs for search and answers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manage Google autocomplete predictions - Android
In the search bar, type a search. Predictions show up below the search bar. Long-press a prediction. Tap Report this. We'll analyze your...
Read more >
Google Search Operators: 40 Commands to Know in 2022 ...
Google search operators are your secret tools to get enhanced info you can use for SEO, content research, & more. Get the full...
Read more >
Discover How Google Search Works
We present results in a variety of ways, based on what's most helpful for the type of information you're looking for. Learn more...
Read more >
Spam Policies for Google Web Search | Documentation
Our spam policies help protect users and improve the quality of search results. To be eligible to appear in Google web search results...
Read more >
How Search Engines Work: Crawling, Indexing, and Ranking
Ranking: Provide the pieces of content that will best answer a searcher's query, which means that results are ordered by most relevant to...
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