Search only within topic titles


(Gerhard Schlager) #1

I’m often in the situation where I only want to search for topics that have certain words in their title.
So, it would be great if there was a search modifier that allows me to search only within topic titles (something like title:search text).

Add "in:title" modifier to advanced search
(Sam Saffron) #2

Keep in mind title matches are always prioritized. One issue I need to fix is that we are using the snowball stemmer which completely sucks compared to say ispell or something smarter, so it does a fair bit of messing with results.

Fine to add an advanced filter, but not sure it is needed cause we already show title matches first.

(Nukeador) #3

My user case is that I need to find all topics with “Meeting” to add them a tag, searching on topics content will return me also false positives :stuck_out_tongue:

(Jeff Atwood) #4

Yeah I would like to have this. Anyone who is interested we can fund this work cc @cpradio who may have advice.

(Penar Musaraj) #5

I will take a stab at this, see if I can figure it out.

(cpradio) #6

Only advice I have is pay attention to the tokenizer, as I’m fairly certain that is something you’ll be utilizing.

(Jorge Manrubia) #7

Hey I’d like to work on this. Is that ok @pmusaraj? I wouldn’t like to overlap with your stuff if you have something in the works.

(Erlend Sogge Heggen) #8

You’re clear to work on this. @pmusaraj is working with us on other stuff.

(Penar Musaraj) #9

Yes, that would be great (I couldn’t figure this out).

(Jorge Manrubia) #10

Pull Request adding this:

First time with PostgreSQL full text search so it would be great if someone with experience had a look :pray:.

(Sam Saffron) #11

Per @jorge_manrubia this is now implemented. I pushed the change here:

Note: the UI is not updated yet, we are going to wait a few betas.

Keep in mind, this change will slowly appear on your forum after the update. We will update the search index for 20k posts every 2 hours to gain the new feature. If you feel like rushing it:

./launcher enter app
rake search:reindex

A rushed reindex is running on meta right now.

Discourse 2.0.0.beta4 Release Notes
Add in:title searching to advanced search UI
(Sam Saffron) closed #12

This topic was automatically closed after 4 days. New replies are no longer allowed.