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

Apiresult #103

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open

Apiresult #103

wants to merge 27 commits into from

Conversation

Shweta4321
Copy link
Contributor

@Shweta4321 Shweta4321 commented Mar 17, 2018

Checklist

  • [x ] My branch is up-to-date with the upstream develop branch.

Which issue does this PR fix?:
fixes: #91

what this PR does?
we can search our query in wikipedia or stackoverfolw

Why do we need this PR?:
it gives relevant answer

If relevant, please include a screenshot.
screenshot from 2018-03-17 15-12-25
screenshot from 2018-03-17 15-12-54
screenshot from 2018-03-17 15-13-01

Copy link

@soc221b soc221b left a comment

Choose a reason for hiding this comment

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

Wow, it's useful.
Please also add reference to #91

And I have some idea for this issue, I will added to the issue.

<div class="tab-pane fade in active" id="tab1default">
<p><a href="{{ res_wiki.url }}" target="blank"/>{{ res_wiki.heading }}</p>
</div>
<div class="tab-pane fade" id="tab2default">
Copy link

Choose a reason for hiding this comment

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

The ids of those dropdown need be difference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will you please tell about which dropdown you are talking, because as of now there is no dropdown in that script.

Copy link

Choose a reason for hiding this comment

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

Sorry, what I want to say is collapse, you could try to clicking wiki/stack on second result, then you get it.

<li class="active">
<a href= "#tab1default" style="color: #1b1e21" data-toggle="tab">
<img src="../static/images/wikipedia.png"/>
</a>
Copy link

Choose a reason for hiding this comment

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

Please check indentations.

@Shweta4321
Copy link
Contributor Author

@AdiChat please review .

@AdiChat
Copy link
Member

AdiChat commented Mar 20, 2018

Nice work 👍

You need to include the images in this pull request. You may place them beside the Solutions button.

You may include this Wikipedia and StackOverflow results for each result from Cosmos. If you search search, several search algorithms from Cosmos comes up and the Wikipedia and StackOverflow icons are present in each result, though, clicking on them opens result in the first result only. You are searching for the search term but for this path, you must take the Cosmos absolute path of the result (example: binary search for the first result for search) and use this as a search term for the APIs.

A user may not explore all Wikipedia and StackOverflow results for all Cosmos results, so, you may use AJAX and Lazy loading.

This will improve the user learning experience as it will give the opportunity to the user to explore a subsection deeper.

Kindly take a look into this. 👍

@Shweta4321
Copy link
Contributor Author

@AdiChat Review.

@Shweta4321
Copy link
Contributor Author

@AdiChat Review

@AdiChat
Copy link
Member

AdiChat commented Apr 4, 2018

Great work 👍

You need to include the images in this pull request.

Consider the results for the term "search". The Wikipedia results are fine but the StackOverflow results are the same for every result indicating that it is for the keyword "search" not for a particular result like "linear search".

The UI is broken. Lower results are nested in upper results. See for the search term "search".

Kindly take a look at this. 👍

@Shweta4321
Copy link
Contributor Author

@AdiChat In case of more numbers of Solutions like in Sort , it is giving too many requests from this IP error

screenshot from 2018-04-07 19-27-21

@AdiChat
Copy link
Member

AdiChat commented Apr 7, 2018

Yes, this issue will remain even if we resolve it for this case by using AJAX as there will be multiple users in production.

One solution is to write a script to search a search engine like Google for keywords like site:stackoverflow.com and site:*.stackexchange.com, collect and store the results in a database ( like Solr) and use it to serve results through Cosmos-Search.
In short, we need to create an equivalent of its sitemap as it is not publically available.

This can be done for Wikipedia as well.

Once done, we can update the database in a couple of months to keep new results in consideration.

@Shweta4321
Copy link
Contributor Author

@AdiChat Please review

@Shweta4321
Copy link
Contributor Author

@AdiChat Please Review

@AdiChat
Copy link
Member

AdiChat commented Apr 16, 2018

Nice work 👍

The UI and functionality look perfect.

As all search requests will be made from a static IP and as the number of users will increase, this feature state may break as requests to Wikipedia API and Google search will be restricted.

A more robust solution is to crawl selected sites and use the stored data to present results. A couple of crawler code in Python are available which can be modified for our purpose.

Kindly take a look into this. 👍

@Shweta4321
Copy link
Contributor Author

@AdiChat please review

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.

Include search results from trusted sites
3 participants