Open jdhayhurst opened 2 months ago
New functionality is demonstrated below:
query AllTractabilityAntibodyFacets{
facets(entityNames: ["target"], queryString: "*", category: "Tractability Antibody") {
total
hits {
label
}
}
}
returns:
{
"data": {
"facets": {
"total": 9,
"hits": [
{
"label": "Approved Drug"
},
{
"label": "Advanced Clinical"
},
{
"label": "GO CC high conf"
},
{
"label": "UniProt loc med conf"
},
{
"label": "GO CC med conf"
},
{
"label": "UniProt loc high conf"
},
{
"label": "Human Protein Atlas loc"
},
{
"label": "Phase 1 Clinical"
},
{
"label": "UniProt SigP or TMHMM"
}
]
}
}
}
query QueryTractabilityAntibodyFacets{
facets(entityNames: ["target"], queryString: "clin", category: "Tractability Antibody") {
total
hits {
label
}
}
}
returns:
{
"data": {
"facets": {
"total": 2,
"hits": [
{
"label": "Advanced Clinical"
},
{
"label": "Phase 1 Clinical"
}
]
}
}
}
here's an example showing how, for example, you can get 3 facets for 3 categories in one request:
query FacetQuery{
allCategories: facets(queryString: "*", entityNames: ["target"], page: {size:3, index:0}){
hits {
label
}
}
tractabilityOther: facets(queryString: "*", entityNames: ["target"], category: "Tractability Other Modalities", page: {size:3, index:0}){
hits {
label
}
}
tractabilityPROTAC: facets(queryString: "*", entityNames: ["target"], category: "Tractability PROTAC", page: {size:3, index:0}){
hits {
label
}
}
}
As a user I want to be able to filter facets by category and return all facet labels for a given category.
Background
Use the
category
field as filter field and the matchAll query when a "*" query is given.Tasks
category
field, using the above argumentAcceptance tests
How do we know the task is complete?