2 ms·
You can do that in a search box by allowing advanced syntax. For example, Google allows 'keyword site:news.ycombinator.com', and there's no reason you can't ext
by bensummers 17y ago
You can do that in a search box by allowing advanced syntax. For example, Google allows 'keyword site:news.ycombinator.com', and there's no reason you can't extend this with full boolean logic and nested bracketed clauses.
We do this in my product, which is sort of a semantic web inspired wiki with very precise metadata. You can enter a simple query, and it uses everything at its disposal to get you good results ranked appropriately. But in the same box, you can write arbitrarily complex queries, even doing graph traversal across the linked objects in the store.
However, simple one or two word queries still work. The only slight concession to complexity that we've made is that when you start entering a complex query, the app draws a picture which explains how the query is interpreted, as a little aid to the user.
But it's still a simple text box with a button next to it.