Skip to content
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

Yahoo Search Added #887

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open

Conversation

Harshil0512
Copy link
Contributor

@Harshil0512 Harshil0512 commented Oct 27, 2023

Implemented Yahoo Search
To utilize this functionality, follow these steps:

Get the Serpapi API Key:
If not, refer to https://serpapi.com/yahoo-search-api

Add API Key to Swirl Configuration:
Insert API Key into your Swirl configuration file.

Restart Swirl:
Restart Swirl to apply the changes.

Now, you can start searching for Yahoo Search content.

Related Issue(s)

Associated issue https://github.com/swirlai/swirl-search/issues/789

Type of Change

  • Bug fix or other non-breaking change that addresses an issue
  • New Feature / Enhancement (non-breaking change that add or improves functionality)
  • New Feature (breaking change that is not backwards compatible and/or alters current functionality)
  • Documentation (change to product documentation or README.md only)

@sidprobstein
Copy link
Contributor

Hi @Harshil0512 thank you for this! I am going to check and see if the serpapi package is desireable or if we would prefer to do these using RequestsGet. Thank you

@Harshil0512
Copy link
Contributor Author

Harshil0512 commented Oct 27, 2023

Hi @Harshil0512 thank you for this! I am going to check and see if the serpapi package is desireable or if we would prefer to do these using RequestsGet. Thank you

Yaa sure @sidprobstein Please let me know, if required then I'll change it but I think this should work as it is giving us the desired response

@Harshil0512
Copy link
Contributor Author

Hello @sidprobstein are you there ?

@Harshil0512
Copy link
Contributor Author

Hello @sidprobstein Please reply to me, I'm ready with another search provider but unable to create another PR due to this PR is not merged

Copy link
Contributor

@erikspears erikspears left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @Harshil0512 ,

Thank you for the contribution! Please make the following adjustments to the PR...

  • Do not add the SearchProvider JSON to SearchProviders/preloaded.json file
  • Retarget the yahoosearch.json file to land in the SearchProviders/untested directory
  • Add the CosineRelevancyResultProcessor last to the list of query_processors (and you might need the MappingResultProcessor as well, if you're going to use result_mappings below)
  • Try to add some response_mappings values from the API response (see here)
  • Pleae add some proper result_mappings to the SearchProvider JSON file (see here)
  • Retarget the yahoosearch.py file to land in the swirl/connectors/untested directory
  • Remove the changes to settings.py and models.py from the PR

Also, I'm curious about the GoogleSearch import in line 12 of your connector file...why is that there? @sid-swirl should likely review the connector code in more detail though.

If you can make the above updates as a start, that would be great.

Thanks!

@Harshil0512
Copy link
Contributor Author

Hello @Harshil0512 ,

Thank you for the contribution! Please make the following adjustments to the PR...

  • Do not add the SearchProvider JSON to SearchProviders/preloaded.json file
  • Retarget the yahoosearch.json file to land in the SearchProviders/untested directory
  • Add the CosineRelevancyResultProcessor last to the list of query_processors (and you might need the MappingResultProcessor as well, if you're going to use result_mappings below)
  • Try to add some response_mappings values from the API response (see here)
  • Pleae add some proper result_mappings to the SearchProvider JSON file (see here)
  • Retarget the yahoosearch.py file to land in the swirl/connectors/untested directory
  • Remove the changes to settings.py and models.py from the PR

Also, I'm curious about the GoogleSearch import in line 12 of your connector file...why is that there? @sid-swirl should likely review the connector code in more detail though.

If you can make the above updates as a start, that would be great.

Thanks!

Thank you so much @erikspears for your reply, I performed the changes you've suggested to me can you please have a look into it.

GoogleSearch import in line 12 of your connector file
Actually it is the general class name of serapi in which we can get yahoo search specific response by specifying engine as below

{ "p": "coffee", "engine": "yahoo", "api_key": apikey, "output": "json" }

for more info you can visit https://serpapi.com/yahoo-search-api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants