# Query name : query4.4 # Query Type: 4, Historical single-version structured query # Query Description : # Retrieve all creative works from a specific past version, which contain a a certain word # in their title or description. The size of the resultset is limited by a random number # between 1 and 1000. # A Full-text search query. # Query Answering Choke Points : # - OPTIONAL clauses (treated by query optimizer as nested sub-queries) # Optimizer should decide to put optional triples on top of the join tree # (i.e. delay their execution to the last possible moment) because OPTIONALs are treated as a left join # - Optimizer should be able to split the FILTER conditions into conjunction of conditions and # start their execution as soon as possible thus eliminating intermediate results # - A possibility for optimizing the full-text search by using appropriate index PREFIX bbc: PREFIX cwork: PREFIX rdfs: SELECT DISTINCT ?creativeWork FROM WHERE { ?type rdfs:subClassOf cwork:CreativeWork . ?creativeWork a ?type ; cwork:title ?title ; cwork:description ?description . OPTIONAL { ?creativeWork cwork:dateCreated ?dateCreated . } OPTIONAL { ?creativeWork cwork:category ?category . } OPTIONAL { ?creativeWork bbc:primaryContentOf ?pco . ?pco bbc:webDocumentType ?webDocType . } FILTER (CONTAINS(?title, "bottomed") || CONTAINS(?description, "moieties")) . } ORDER BY DESC(?dateCreated) LIMIT 222