Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
github.com/stevenferrer/solr-go
$ go get github.com/stevenferrer/solr-go
import (
"github.com/stevenferrer/solr-go"
)
...
// Create a client
baseURL := "http://solr.example.com"
client := solr.NewJSONClient(baseURL)
// Create a query
query := solr.NewQuery(solr.NewDisMaxQueryParser().
Query("'solr rocks'").BuildParser()).
Queries(solr.M{
"query_filters": []solr.M{
{
"#size_tag": solr.M{
"field": solr.M{
"f": "size",
"query": "XL",
},
},
},
{
"#color_tag": solr.M{
"field": solr.M{
"f": "color",
"query": "Red",
},
},
},
},
}).
Facets(
solr.NewTermsFacet("categories").
Field("cat").Limit(10),
solr.NewQueryFacet("high_popularity").
Query("popularity:[8 TO 10]"),
).
Sort("score").
Offset(1).
Limit(10).
Filters("inStock:true").
Fields("name", "price")
// Send the query
queryResponse, err := client.Query(context.Background(), "techproducts", query)
See integration test for a more complete example.
Keep in mind that this library is still evolving and will likely have some breaking changes until v1.0. We will try our best to keep the breaking changes minimal.
You can support the project in the following ways:
Please feel free to improve this project by opening an issue or by making a pull-request.
MIT
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.