News for hackers. Stuff that matters.
Re:Hacker News Search by k7d on Saturday June 04, 2011 @05:20PM (#2620497)
For example what's the difference between "filter[queries][]" and "q" arguments for http://www.thriftdb.com/documentation/rest-api/search-api? The way I understand, q does a simple keyword matching on all fields while "filter[queries][]" is more like SQL "where" query. In that case, what operators are supported?
Re:Hacker News Search by andres on Saturday June 04, 2011 @05:44PM (#2620545)
The `q` argument is used to perform a full-text search across all fields. One benefit to using `q` is that you can rank results based on field matches (using the `weights` argument).

The `filter` arguments are used to cut the data before performing a full-text query:

`filter[fields][fieldname]` can be used to filter on fieldnames:

http://api.thriftdb.com/api.hnsearch.com/items/_search?filte...

`filter[queries][]` can be used to add arbitrary filters:

http://api.thriftdb.com/api.hnsearch.com/items/_search?filte...

http://api.thriftdb.com/api.hnsearch.com/items/_search?filte...

The syntax for filter queries is the same as solr:

http://wiki.apache.org/solr/CommonQueryParameters#fq