-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Solr provides extension ranges of request parameters. These are encapsulated in various Hui query structs, some of which are large and complex, e.g. the common parameters: https://github.com/boonious/hui/blob/master/lib/hui/query/common.ex
In addition to new functions that creates empty structs, modifier functions can be implemented in Builder design pattern to enable more idiomatic, stepwise construction of query structs e.g. with the use of pipe operator.
[Hui.Query.DisMax.new, Hui.Query.Common.new, Hui.Query.Facet.new]
|> q("apple", qf: "title^2.3 author description^0.4")
|> page(rows:10, start: 10, sort: "date desc")
|> fl("id,title,date,description,author,publisher,subject")
|> facet(field: ["author", "format"], query: "edited:true", pivot: "subject,format")Tasks
- implement modifier functions e.g.
page,facetin query struct modules - create a helper module that matches and delegates modifier functions to corresponding query struct modules
- documentation: update README and module doc
Metadata
Metadata
Assignees
Labels
No labels