Skip to content

Commit

Permalink
rewrite xpath
Browse files Browse the repository at this point in the history
to fix strange issue where 0 results would be returned if another filter facet was applied next to "occupation" for orgs.
  • Loading branch information
peterstadler committed Feb 1, 2024
1 parent 1bb2e80 commit 9732ade
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/query.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ declare function query:get-facets($collection as node()*, $facet as xs:string) a
case 'librettists' return $collection//mei:persName[@role='lbt']/@codedval
case 'composers' return $collection//mei:persName[@role=('cmp','aut')]/@codedval
case 'docSource' return $collection/tei:person/@source
case 'occupations' return $collection//tei:occupation | $collection//tei:label[.='Art der Institution']/following-sibling::tei:desc
case 'occupations' return $collection//tei:occupation | $collection//tei:label[.='Art der Institution']/parent::tei:state/tei:desc
case 'residences' return $collection//tei:settlement[parent::tei:residence]/@key | $collection//tei:label[.='Ort']/following-sibling::tei:desc/tei:settlement/@key
(: index-keys does not work with multiple whitespace separated keys
probably need to change to ft:query() someday?!
Expand Down

0 comments on commit 9732ade

Please sign in to comment.