Jump to content
deanishe

Searchio! Auto-suggestion from search engines in different languages

Recommended Posts

Is there any way to make one of these searches the fallback search option in Alfred?

 

You could add any of the searches to the fallback search list (e.g. "Search Spanish Wikipedia for '<query>'"), but there's no way to get Alfred to call the search and show the returned suggestions in its fallback results.

Share this post


Link to post

Thank you! Would be nice to have a foursquare search with suggestions.

 

I had a look at the Foursquare API and it's way beyond the scope of this workflow, I'm afraid.

Share this post


Link to post

I suggest using the new queue setting to terminate the script filter when a new keypress is received. It shaves a few microseconds off when typing, not a big difference but definitely adds a snappier feel.

Share this post


Link to post

Not until I've figured out if and how Alfred's killing scripts messes with Alfred-Workflow's caching code. I don't want the workflow generating loads of invalid query cache files because Alfred is killing the process in the middle of a cache write.

 

It's simple enough to wrap critical code so that signals are ignored till the code completes, but there's other stuff much higher up the TODO list.

Edited by deanishe

Share this post


Link to post

Unfortunately, the Amazon sites all need to be hand-coded to get the right suggestions language, domain etc. I've added amazon.com.br in version 1.6.

 

Also added yandex.ru (Russian-language only).

 

Download from GitHub.

 

 

Now I have the same problem with eBay Search in Portuguese language. shop.ebay.pt domain does not exist.

Share this post


Link to post

Now I have the same problem with eBay Search in Portuguese language. shop.ebay.pt domain does not exist.

What is the domain for the Portuguese/Brazilian eBay?

Share this post


Link to post

What is the domain for the Portuguese/Brazilian eBay?

 

I don't know if a Brazilian domain exists. If I browse ebay.com the website automatically detects my language and currency.

 

P.S.: I don't know if it's relevant but whether I enter ebay.com.br I am redirected to ebay.com.

Edited by PebaVermelho

Share this post


Link to post

What happens when you use the workflow with ebay.com (i.e. in English)? Do you get English results or local ones?

 

If I change my system language to English I get results in Portuguese on ebay.com page also in Portuguese.

Edited by PebaVermelho

Share this post


Link to post

That's because the eBay API is returning results based on your location (IP address) regardless of your settings.

There's no need to change the system language. The whole point of this workflow is to enable you to use multiple languages at the same time. You just need to adjust the Script Filter to use a language other than your system one.

Adding --lang en to your eBay Script Filter should fix the issue.

Please see the documentation for details.

Edited by deanishe

Share this post


Link to post

Thank you so much for making and sharing this. I love how versatile it is and seeing results in-line. Do you think it might be possible to add in the Google Play Store? More specifically, the App Store? Although, if possible, other people might like the ability to search through the others. Just a thought :)

 

Also, if you're feeling very generous and productive one day, I think it'd be awesome to have support for these sites as well:

Not expecting anything, just thought I'd throw my picks in here :)

Share this post


Link to post

Oh! How does one go about figuring that out? I have very limited knowledge in the field, so all that occurs to me when you say "suggestions API" is the feature, where a site comes up with suggestions, as you type. Like Wikipedia, and IMDb, as you mentioned. But I'm guessing there's something more to it, since Game of Thrones Wikia and A Wiki of Ice and Fire do give suggestions, when you search.

 

I'd want to know how to figure it out, so I don't make more suggestions, without checking if the sites are actual possibilities for you to implement.

Share this post


Link to post

Normally using Google. Search for "autosuggest API". Most of the current search engines were taken from Instantfox.

Both AWOIAF and Wikia are based on MediaWiki, so they have the necessary APIs.

I could see adding Wikia, but not most of the others.

I think the best solution would be to refactor the workflow to make user-defined engines possible (and easy).

Share this post


Link to post

I've added Wikia support in version 1.8. The Wikia example in the workflow is already set up for the GoT wiki, it just needs a keyword set.

Get the new version from Packal or use the built-in updater by entering searchio workflow:update in Alfred.

Share this post


Link to post

Thanks a lot, man. I appreciate you taking the time to explain. I'm going to look into it and see if I can educate myself a bit.

 

Updated with your neat searchio workflow:update query, and it works like a charm! Once again, thank you.

Share this post


Link to post

Searchio is a really great workflow, but I wished you could force it to optionally search for the actual phrase you've entered (i.e., directly pass the entered terms to the appropriate search engine web page).

 

Most of the time, the suggested search results are very good, but I also regularly run into situations, where the suggested search terms differ from what I've actually entered. I noticed this especially with the Amazon search (and there especially with model numbers, which you often really don't want to get wrong if you are searching for a specific part), but it also happens to me with other engines such as DuckDuckGo (usually when you search for less common terms).

 

I tried defining Web Searches in Alfred with the same keywords as their counterparts in Searchio, so that I would always have a static "Search with Engine X" option among the results as a fallback. Unfortunately, that did not work very well either: Since I usually use the Searchio results, the Web Search entry is regularly pushed to the end of the list, so that I need to scroll down. Or worse: once in a while, the entry for the Web Search simply does not appear at all among the Searchio results.

 

In the 93% of situations where it works as expected, I'm absolutely thrilled to be able to use such a nice and sophisticated workflow that supports such a large number of search engines in such a convenient way. In 6% of the situations, however, I start to wonder if it would not be easier to just go back to the simple Web Searches that I used before I discovered Searchio. In the remaining 1% of situations, I do things like (unsuccessfully) looking into the Searchio code to see if I can easily make the necessary changes myself, or writing a very long forum post about it. ;)

 

After thinking a bit about this issue, I could imagine two ways how it could be addressed. The first option would be to implement that holding down a modifier key while hitting return would force Searchio to pass the entered search terms verbatim to the appropriate search engine. This would not visibly change how Searcho currently works, and instead just add additional functionality.

 

The second option would be to always include a static search for the entered search term as the first result that Searchio returns. The advantage of this approach would be that it would also address another issue: if you type really fast and hit return immediately afterwards, you often do a search for a pretty incorrect search phrase, because you hit return when the results list is still in the process of being built and sorted. The downside of this option would be that users who encounter neither issue (because they don't type too fast or don't often search for uncommon search terms) would always need to first hit arrow down once to get to the top search suggestion instead of being able to simply hit return. I guess injecting the static Web Search always as the second result could address this downside, if that were feasible.

 

For me personally, the second option would be the preferred solution, but the first option would also be a tremendous improvement.

 

Anyway, thank you very much for your time and attention, and, more importantly, for such a nice piece of software. :)

 

 

Share this post


Link to post

The default behaviour is to only show your query as a result if no other results are returned.

 

This can be altered, as detailed in the help file.

 

Enter searchio in Alfred (which will show the workflow's settings) and hit ENTER on the second item (Show query in results). That will always show your query as the top result.

 

Does that help?

Share this post


Link to post

That absolutely helps, thank you for the prompt reply.

 

While I do feel a bit stupid for not seeing that option myself, that feeling is overshadowed by the joy that the issue has already been solved without me knowing about it. :)

 

Again, thank you for all your great work!

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...