Advanced Search


(hamburglar) #1

I don’t see any discussion of an “advanced” search mode, but I’m assuming it’s somewhere on the horizon. One suggestion I have about search in general is that it would be really cool to have a way to get RSS and/or bookmarks for a specific search, a la craigslist. This would enable users to build their own custom view of a forum, making it almost seem like custom-tailored subforums.

Also, having implemented a backend search index before, I know that certain types of information are pretty easy to stick in the index (assuming you’re using something like solr or elasticsearch) and that the simple task of just coming up with a list of what attributes you want to index can be an ongoing effort, so perhaps it would be helpful to have a list of user suggestions for searchable attributes. For example, it would be cool if one of my search terms could be replyto:hamburglar. Or numposts:100+. Or
category:foo OR category:bar". Thinking up novel attributes to search on is one way Discourse could distinguish itself from the forum status quo.


How can I search with multiple tags?
(Sam Saffron) #2

Keep in mind our primary goal is to make the basic search kick ass. I am not against an awesome advanced search or search options, but the mission is to have the standard search simply rock.


(Jeff Atwood) #3

Yeah but we still need a full search page of some kind, otherwise there’s no place to send people when specifying a search URL, no place to enter advanced search options, etc.


(Tim) #4

@sam
I don’t like the idea of losing my standard browser find - it makes the website work in a non-standard way which could be frustrating or confusing at the least.

as @tjbarbour mentioned, an alternative but similar keystroke would be preferable.

One thing I noticed straight away, was that the search doesn’t highlight the posts when you click on them. As a result, I found myself using a combination of search & CTRL+F to find where a word was in a post.


(Sam Saffron) #5

Google docs kidnap ctrl+f for the exact same reason, when you hit it you expect to search the whole page, and the whole page is simply not in memory.


(Luke S) #6

I’d agree that there should be an advanced search page, esp. for occasional searches.

One thing that would really enhance the basic search box, at least for the way I search, is to allow access to the advanced search through typed syntax. I’m thinking something like the way google works…

“This exact phrase”

+that word must be present.

-Another word must not be.

etc. (there are a lot more than most people think)

I would use such searches for combing through large forum histories.

Sorry for the inevitable SE reference, but one of the things that I have found lacking over there is that the advanced search has never been quite flexible enough, but searching with the external engines doesn’t allow me to filter by tag. (Category here, I suppose) I guess I’d say I’m looking for the best of both worlds…


(Tincu Gabriel) #7

Hey there,
Since this tread is (i hope ) still active i thought it might be a good place to ask what the search backend uses. Did you guys give solr/lucene any thought since i see things like high performance and complex query syntax floating around here. Sorry if i’m reviving a dead thread but this seemed as good a place to ask as any


(Jeff Atwood) #8

I believe we just use the built in full text search capabilities of Postgres at the moment.


(Tincu Gabriel) #9

Heck,
If you guys ever want to switch to a dedicated search engine i’d be happy to chip in with some code. The index for a forum should not be too large, the fields themselfes should not even be indexed, and the speed increase and search syntax bonus wouls probably be a great benefit . I’m not even sure you guys need solr seeing how for this particular application the schema is pretty much hard coded so lucene would probably fit nicely


(Piotr Szal) #10

I think discourse need a search engine.

On our database with 5mil posts a search of “Software” needs 3.5 sec and this is only the search in db on out production like staging server.

discourse_staging=# explain analyse select count(post_id) from post_search_data where search_data @@ to_tsquery('Software');
                                                              QUERY PLAN
----------------------------------------------------------------------------------
 Aggregate  (cost=349758.87..349758.88 rows=1 width=4) (actual time=3692.832..3692.832 rows=1 loops=1)
 ->  Bitmap Heap Scan on post_search_data  (cost=1953.49..349308.07 rows=180321 width=4) (actual time=89.709..3645.128 rows=189985 loops=1)
     Recheck Cond: (search_data @@ to_tsquery('Software'::text))
     Rows Removed by Index Recheck: 444827
     ->  Bitmap Index Scan on idx_search_post  (cost=0.00..1908.41 rows=180321 width=0) (actual time=86.616..86.616 rows=189985 loops=1)
           Index Cond: (search_data @@ to_tsquery('Software'::text))

Total runtime: 3692.938 ms

Or is the query not correct?


(Sam Saffron) #11

We need to make it pluggable so you can run elastic search or sphinx at very large scale


(Sam Saffron) #12

I added some advanced search stuff today, see:


(Clay Heaton) #13

I would just like to chime in here to say that I’d love to see the ability to search by multiple tags - or even have the tag search page treat the tags like filters, where you can dynamically add and remove them from the search, watching the returned posts update as you change the filter.


(Lucas Vickers) #14

For what it’s worth, I’m working with a large open source project and we decided against discourse due to the lack of advanced search.


(Jeff Atwood) #15

Were you looking at the current version? Use the help link in search to see the current advanced search operators

This topic is quite old and out of date, and should probably be deleted.


(Lucas Vickers) #16

Thank you for pointing this out! I’ve let my colleagues know.


(Jeff Atwood) #17

We plan to do even more around this in 1.4 starting in June.


(Lucas Vickers) #18

Hi Jeff,

Just reporting back what I’m hearing from my colleagues. Everyone feels the ability to search and have the results in a separate page will be huge. Very similar to what happens when you click “search with google”, except the results should be stylized and supported by data specific to the forum - such as Poster, Last Modified, Forum Name, etc.

I’m not sure what you guys have going on behind the scenes but perhaps this is not a huge step forward from your existing capabilities.

Thanks!


(Jeff Atwood) #19

Yep, as mentioned above, we have plans for this in 1.4 starting in June.


(Sam Saffron) #20

Full page search is now live:

https://meta.discourse.org/search?q=full%20page%20search