Discourse Search - How does it work?

So for the first time ever I tried using the search.

There’s no search button. HItting enter toggles and untoggles the checkbox if I had checked it. Moving focus back to the search box gives zero indication that anything is happening or has happened.
The subforum I was on didn’t seem to change either.

How is search supposed to work? And why isn’t there an obvious submit button? Was it deemed “too fugly for the forum style”?

I was surprised how easily frustrated I got from a simple search box.

After you type 3 characters it just starts searching (ajax-y)…
Where was your focus when you pressed Enter… Enter does nothing for me, unless I’ve set focus to a search result

I should probably be testing this in Opera 12… bbiab once I get that open again :smile:

Well, this blows. Opera doesn’t seem to follow the links properly when tabbing. You can’t tab to the search links… :confused:

I don’t even see search links.

I found another, separate issue… maybe you can check if other browsers get this? I couldn’t find any clear CSS causing this, but the tag list you see when creating a topic… goes way offscreen instead of sensibly wrapping to screen width (everything else wraps so far).

Yep, we are aware of the tag list issues and are working on a solution for it.

Search: (this is in Opera 12)

Huh, I didn’t see anything when I first tried. It might have been because I tabbed straight from the search bar to the checkbox. Just now, I clicked search (where my old query is still sitting), added “foo” to the end (nothing happened of course) but when I removed foo and hit ENTER, suddenly stuff appeared underneath.

Keep in mind that checkbox alters the query. It may be searching a specific category versus the entire site versus a topic you are viewing.

Doesn’t seem to matter. There are never results if a checkbox is checked.
What am I missing?

(these screenshots are on the same page, both within Marketing)

Update: it seems if I refresh my screen, sometimes it works and sometimes it doesn’t. I can’t tell what then is going on, or if I’m the only one getting this.

Okay, that is because “Search this topic” doesn’t search the topic title. It searches the posts.

“universal” is not mentioned in the post and by design Discourse uses “AND” for all words entered (at least, that is how it seems to behave).

In your later example, it is searching the whole forum, which is why you see your topic (which includes searching the topic title and posts).

Huh, interesting.

Is there an “advanced” dedicated search page somewhere, where we could set params or something?

Also, I still don’t know, what are you guys using for search? That AND is default smells like Lucene-based : )

I’m not sure what they are using either. I thought it was purely Postgres, but I could be wrong.

At this time, there isn’t an “advanced” search page :frowning: I know it is on their roadmap though.

I would never believe any large group would choose a database for search, not even Postgres.

The difference between times is staggering. Now the two Russian Postgres search geniuses have made a patch to Postsres to increase speeds tremendously, but I don’t think it’s even landed in stable yet. I found a cool PDF from PGcon from last year talking about the patch (supposed to land after 9.4?).

Without that patch, the differences are like this:
(search of 20 million descriptions)
queries in 8 hours:
postgres: 2.67 million
sphinxsearch: 26 million

(search of 6 million classifieds)
queries in 8 hours:
postgres: 3 million
sphinx: 32 million

usually indexing is slow as well as searching itself.

This isn’t a problem of Postgres either, but database internal full-text search in general. You’d think internal search would be faster, but for reasons I’m still trying to figure out, external search engines always kick their butts. …and that’s with the externals needing to do at least one SQL request for all the data they want to index first, too.

The Sphinx people have said that they added “” requests for full-scan queries only because of demand-- that many external search engines can even be faster with full-scan queries, which is just insane.

See, fairly certain they are only using Postgres

Apparently the reason the two Postgres dudes compared themselves to Sphinx was merely because Sphinx is one of the fastest.

ElasticSearch (based on Lucene) has probably a gazillion more features.

I think I also assumed that, as with forums like vBullitin, that each owner of their forums could choose their own setups. (for example, the digitalpoint guy had been playing with both Sphinx and ES for his forums, until he had to go to prison for a few months : ) Is Discourse different at this point?

Also, I think from post #28 on, should probably be split to some other thread : P I didn’t think of it at the time.

Unfortunately, it would likely involve a lot of work to get Discourse to use Sphinx, ElasticSearch, or Lucene. To my knowledge, there isn’t any way to configure it at this point in time.

Probably at this point where things are so unstable and no dedicated SERPs exist or show up, yeah. Installing (basic) Sphinx is dead-easy actually, if at some point later on you guys want to test it out. There’s even a Ruby-specific thingie out there I keep hearing about called ThinkingSphinx. We use Python+Postgres so we just use the plain old API. Searching bazillions of products based on synonyms, custom groupings, and having a “did you mean…?” meant we couldn’t use just Postgres (though also at the time we started using external search, we were still on 8.something… we’re now at 9.1 so still don’t have access to the nicer indices newer Postgres seems to have).

Setting any of these up isn’t actually all that bad, but they can all have a lot of tweaking that make huge differences in either speed or relevance. Basically I know the Postgres guys have been trying to add all the things into their GIN that the external search engines have been doing all along (because database searches like tsearch were created more for DBAs and others to search specific things, rather than the kinds of loose, relevance-seeking searches done by users). Are you guys using the latest and greatest of Postgres, 9.3 or 9.4? Would be cool to know if you guys have the Magical Russian patches in your search : )

Those are beyond my involvement, @HAWK, @santouras