-
Notifications
You must be signed in to change notification settings - Fork 6
836 public search option #964
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
Conversation
# Conflicts: # backend/app/routers/elasticsearch.py
ddey2
left a comment
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.
@tcnichol I can see the public datasets in the dropdown list for public search. But when I click enter or click on any of the dataset form the dropdown list, it doesn't take me to the search result page or the dataset page itself.

I think I have fixed this. I noticed that in the search results the links were not for public_datasets or public_files, they were the same as for logged in search. I added a PublicSearchResult component which should fix these issues. |
unused imports
longshuicy
left a comment
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.
Public search works.
Regular Search now also includes public information.
One mis-match i noticed is:
- Public search found an item
- Click link of that item leads to the wrong url
e.g.
http://localhost:3000/public/datasets/65e0cd7d97540f9ae8425eba
vs
http://localhost:3000/public_datasets/65e0cd7d97540f9ae8425eba
|
I checked and the search result links should be fixed for public search now, for both files and datasets. |
ddey2
left a comment
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.
Rest looks good to me. Once you import SearchDatasetIcon, public search works.
|
@tcnichol Clicking on the link after the search doesn't work. Clicking on the dataset takes you to the main page. |
ddey2
left a comment
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.
left comment
|
@ddey2 I noticed that there was an inconsistency in the routes for public_datasets. Some spots had public/datasets instead. Went through and I think I fixed that. Though now the link to the public search is broken at the top of the Public page, working on that. |
ddey2
left a comment
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.
Looks good.
longshuicy
left a comment
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.
|
@tcnichol any chance you have addressed public files not searchable issue? If it is challenging, could you create another issue to address that separately? The rest of this PR looks good. |
Let me check. I think it should be fixed because the problem was that the fields for public or authenticated were null for files in elasticsearch, but that should be fixed now. I'll make sure it is working. |
@tcnichol is this fixed now? Thanks. |
longshuicy
left a comment
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.
After drop volume and restart, elasticsearch is indexing properly and I can search for files. Approved.



This pull request will enable a search of public data for non-logged in users.
It also fixes a problem. When a logged in user would search, public and authenticated matches were not being shown. In the query 'public' and 'authenticated' had to be in all lowercase. Additionally, not all files were having their status updated when the dataset changed. This is also fixed.
To test, create datasets. Make sure some are public and authenticated.
If no user is logged in, public datasets and files should show up in search results.
If a user is logged in, public and authenticated datasets and files should show up in search results, along with their own items or datasets explicitly shared.
Changing the status of a dataset should be reflected in search results.