-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offer to search Google when no search results are returned #62
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this kind of thing should be made differently. I propose that there should be property "IsGlobalProvider" and when search returns nothing or less than some amount then we could fill it in with global providers like google. Than any provider would have this option. Another thing is that not everyone will want this, so configuration must be in place for it.
@@ -48,6 +48,11 @@ public FileProvider(IFileIndex index, IconLoader loader) | |||
return await _index.Find(query.Raw?.Trim(), CancellationToken.None).ConfigureAwait(false); | |||
} | |||
|
|||
protected override Task<IQueryResult> CreateFallbackResult(string query) | |||
{ | |||
throw new NotImplementedException(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think this should be here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is a bit temporary (forgot to add a comment about that). Any suggestions on how to handle the cases where a provider is not global provider
I see your point about not every provider being a global provider. Do you think the |
Maybe not a property, but extended IQueryProvider -> IGlobalQueryProvider. Tho it depends. Need more people opinion on this. |
Yeah, that's more like what I was leaning towards too. Let's get some more opinions, though 👍 |
Nice initiative, but I think this PR strays from the original issue which was that the Google provider should allow you to search for things not suggested by the Google web service. Personally I think that each provider should be responsible for whether or not to show fallback values, and not done globally. |
|
Adds a function on
IQueryProvider
to supply a "fallback result" which supplies a generic search with the provider. This makes it possible to add a setting specifying a desired fallback provider in the user settings later.This closes #8.