After a while of being in the shadows I found time to work on a plugin that should give users the ability to find what they're looking for. As I usually do, I got inspired by StackOverflow, the #1 Q&A site in the world, so I tried to adapt the way they search to the Q2A world.
I think how Q2A searches for posts is a bit obscure and can only be fully understood by looking at the code. In short, it matches the query string against all posts that have at least one word from the query string in the title, content, tag or even as a username. Then it ranks everything based on a fixed criteria, such as if the word is in a title it's twice as important as if it's in an answer.
The issue with the default search is that it generates a huge amount of matches and doesn't allow the user to be more specific such as only looking for words in the title of a question or looking for content within a particular tag. These issues are the ones that the Advanced Search plugin aims to tackle.
Plugin features include:
- Filter posts by question title, tags, author or content
- Ability to force and exclude words or tags in the results
- Combine tag, title, content, username searches in a single query
- New ways of filtering questions (amount of views, amount of answers, score, close status and selected answer status)
- A Small and handy widget can be included for a quick reference
- External users support
Here are some examples of useful searches and what they mean:
- tag:math square triangle - matches posts with the words square or triangle within the math tag
- +tag:programming-language +tag:c# user:john - matches posts with both tags programming-language and c# created by the user john
- content:break -title:car isaccepted:true - matches posts that have the word break only in the content of the post, that don't have the word car in the question title and that have an answer accepted
- tag:electronics -tag:computing isclosed:false views:100 - matches posts within the electronics tag that are not tagged as computing, that are not closed and that have at least 100 views
I think these examples give a clearer idea of what the plugin does.
If you are interested in reading more about the plugin you can check the plugin page. There, you'll find some additional features, screenshots and how to order it. You can also find a plugin demo here.