plots2 icon indicating copy to clipboard operation
plots2 copied to clipboard

Tag search improvements

Open jywarren opened this issue 7 years ago • 8 comments

We have a proposal (me and @ebarry) to make the typeahead search primarily tag search, the way it is on https://publiclab.org/tags, and have the full page search be where you get content and people results (see https://github.com/publiclab/plots2/issues/5708 as well!)

Parts of this:

  • [ ] Adding related terms for exact matches: if you enter "coqui" and there's a coqui tag, AND there are not many other results (<3) we add in related tags (pending #5715 tests) using Tag.related('coqui')
  • [x] need to address hyphens - just replace spaces with hyphens when you initiate the search? edge cases?
  • [x] #5708 shows tag search results along top of ALL search results pages, rather than in its own results page. This is nice!
  • [ ] should we /not/ show powertags in these results?

jywarren avatar May 13 '19 19:05 jywarren

Here's where we could insert extra "related" tag results if there are very few results:

https://github.com/publiclab/plots2/blob/7f7c88e2f05ae19b409b8388f497a0ec8bd9c7fb/app/api/srch/search.rb#L272-L290

jywarren avatar May 13 '19 19:05 jywarren

Noting that tag search uses this path: https://publiclab.org/tag/suggested/balloon

https://github.com/publiclab/plots2/blob/d55c716621d8072d0ffcd51b46c6b2b240ce5f4d/app/controllers/tag_controller.rb#L376-L391

jywarren avatar May 22 '19 00:05 jywarren

Also https://github.com/publiclab/plots2/issues/5951

jywarren avatar Jun 26 '19 00:06 jywarren

What's yet to be done on this issue?

ebarry avatar Aug 29 '19 22:08 ebarry

Is this issue still open? If so can u assign it to me?

swathi-0901 avatar Nov 09 '19 10:11 swathi-0901

Hi! We just need to add "pinned" notes to the top of the search results, kind of similarly to how this was implemented: https://github.com/publiclab/plots2/pull/6423/

We'd love your help, but this is a bit complex -- if it's your first time maybe you'd like to try a smaller issue first?

But, apart from that, I think possibly the remainder of these issues might not be worth implementing -- @ebarry what do you think?

Thanks, all!

jywarren avatar Nov 19 '19 19:11 jywarren

I agree, since we are no longer writing our own custom search, let's narrow this issue as Jeff suggests to adding "pinned" content (could be note OR wiki FYI) curated by site administrators to accompany search results.

ebarry avatar Nov 20 '19 15:11 ebarry

<% @pinned_nodes = NodeShared.pinned_nodes(params[:id]) %>
<% if @pinned_nodes.length > 0 %>
<div class="alert alert-warning">
  <i class="fa fa-thumb-tack"></i> 
  <a href="<%= @pinned_nodes.first.path %>"><b><%= @pinned_nodes.first.title %></b></a> 
  <i class="pull-right"><small>featured result</i></small>
</div>
<% end %>

jywarren avatar Jan 03 '20 22:01 jywarren