Mass actions on search results


(Lisa Wess) #1

I’d like to request the ability to perform bulk edits on search results. Our particular use case is that I need to be able to search for keywords and mass add tags to posts (preferably without changing existing tags on those touched posts).

I can imagine there would be other use cases as well…

Thanks!


(cpradio) #2

I think that ties pretty well with the feature for a full search page.


(Sam Saffron) #3

Which you can do now :slight_smile:

https://meta.discourse.org/search?search=tags

I will be improving fullpage search but there is an initial bit of work checked in


(Lisa Wess) #4

What version does that come in, @sam? On our installation I get:

The page you requested doesn’t exist or is private.

On version 1.3.0.beta5.

Thanks!


(cpradio) #5

It should exist there. It does on our staging environment which is 1.3.0-beta5


(Lisa Wess) #6

I can’t get to it- full admin account.


(cpradio) #7

Do you see a green smiley or red smiley on the Version area in the Admin area? As we’re having a weird issue with our Prod instance. We are on 1.3.0.beta4, but it shows 1.3.0.beta5 with a red smiley. Our staging environment is 1.3.0.beta5 with a green smiley.

And our Prod instance has
<meta name="generator" content="Discourse 1.3.0.beta4 - https://github.com/discourse/discourse version a6d72099b4a58ec34b49f77c27769433a220baed">

Staging instance (where it does work) has
<meta name="generator" content="Discourse 1.3.0.beta5 - https://github.com/discourse/discourse version 4ea33608a486eba0f619cc84c2b15de3922a9032">


(Lisa Wess) #8

red smiley. :slight_smile:


(cpradio) #9

Okay, what does your meta generator tag say when you view source? My guess is you really are on 1.3.0.beta4


(Lisa Wess) #10
<meta name="generator" content="Discourse 1.3.0.beta4 - https://github.com/discourse/discourse version c5059682ecd2b7cff39b09f01c7ff42dcc2c7b16">

You are correct. Thank you - very helpful. :slight_smile:


(Sam Saffron) #11

Just a note, with a major refactoring we had to do on search, as a casualty batch select is now lost. you can still pass secret query params to do this, but search is much more like google now.


(Lisa Wess) #12

This is a huge bummer, @sam - when can we expect to re-gain this feature?

To be clear this is an important, regular-use feature for us.

Thanks.


(Sam Saffron) #13

You can still do this.

Discourse Meta but yeah it is not ideal.

It is very hard to fit the concept of “mass actions” on to a list that returns posts. Thinking about this.


(Jeff Atwood) #14

I don’t think it’s so hard – have a left column with a selection present for staff / admins. I can think of lots of actions where “search + take staff action on results” would be useful.


(cpradio) #15

Except all bulk actions today deal with Topics, not Posts. The new Full Page Search returns both Topics and Posts, so now Bulk Actions has to learn about posts and potentially react differently (such as, find its topic ID and act on that instead).


(Jeff Atwood) #16

I strongly disagree with this @sam we should always return at the “page” level, e.g. topics.


(Sam Saffron) #17

We always return a grouped search result, picking at most 1 post from each topic.

But its crazy to suggest that we link these entities always to post #1, even if the text is in post #78.

Search returns a list of posts, no two ways about it.


(Jeff Atwood) #18

I see – this is fine – @cpradio implied it would be a bunch of random posts as search results.


(cpradio) #19

Sorry, wasn’t my intent. I’m glad that we’re all on the same page now though :smile:

I should also mention, that I would also find value in bulk actions being permitted on search results, but I also realize challenges must be overcome to make that work.


(Sam Saffron) #20

This is now implemented per:

https://github.com/discourse/discourse/commit/5865bd2abbac66e1ef5b475b491a2358a1d9d610

There are 2 caveats that I would like to address

  1. A “select all” “deselect all” button
  2. (Long term) allow search to … not be capped … at 50 and keep loading stuff.

This 50 cap makes “super ultra huge” bulk selection very annoying.