[英]Fuseki SPARQL Query: Regex not finding existing literal
我試圖返回基於正則表達式查詢的節點。
select ?s ?p where {
?s a Products:Style .
?s Products:PartNumber ?p .
filter ( regex (?p, "^442A"))
}
我有一個名為Products:442A30的節點。 它具有以下屬性。
Products:442A30 a <http://www.w3.org/2002/07/owl#NamedIndividual> , Products:Style ;
rdfs:label "Gesture; Chair, Upholstered ;
Products:AltDescription "Gesture;Chair,Uph,Adj seat D" ;
Products:BasePrice "1,241.00" ;
Products:ClassNoun "Chair" ;
Products:HasComponent Products:P442_WORK_1 ;
Products:HasServicePart Products:4652510SR ;
Products:LongDescription "Gesture; Chair, Upholstered, Shell back, Adjustable seat depth" ;
Products:PartNumber "442A30" ;
Products:ProductLine Products:442_GESTURE ;
Products:ShortDescription "Gesture;Chair,Uph,Shl bk,Adj seat D" ;
Products:StyleFeature "Shell back" , "Adjustable seat depth" ;
Products:StyleMaterial "Upholstered" ;
除非我沒有記錯,否則我的兩個查詢參數都將得到滿足。 盡管如此,上面的節點不會返回。 相反,我得到了Products:442A30VP
和Products:442B30VP
。
謝謝!
將您的過濾filter ( regex (?p, "^442.*"))
更改為filter ( regex (?p, "^442.*"))
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.