Uploaded image for project: 'Blazegraph (by SYSTAP)'
  1. Blazegraph (by SYSTAP)
  2. BLZG-684

Full text search AST optimizer does not work with nested subqueries

    Details

    • Type: Bug
    • Status: Reopened
    • Resolution: Unresolved
    • Affects Version/s: BIGDATA_RELEASE_1_2_1
    • Fix Version/s: None
    • Component/s: Bigdata SAIL
    • Labels:
      None

      Description

      Here is an example of a problem query:

      CONSTRUCT { ?object ?p ?o . }
      WHERE {
      OPTIONAL { ?object ?p ?o . }
      {
      SELECT DISTINCT ?object WHERE {
      ?object ?sp ?so . ?so bd:search "music" .
      }
      }
      } ORDER BY ?object ?p

        Activity

        Hide
        mikepersonick mikepersonick added a comment -

        I've checked in a test case
        - TestTicket581

        Show
        mikepersonick mikepersonick added a comment - I've checked in a test case - TestTicket581
        Hide
        bryanthompson bryanthompson added a comment -

        This issue is only with the magic predicate rewrite. If you use the SERVICE directly per https://wiki.blazegraph.com/wiki/index.php/FullTextSearch#SERVICE then there is no problem with nesting SEARCH SERVICE calls within a subquery.

        Show
        bryanthompson bryanthompson added a comment - This issue is only with the magic predicate rewrite. If you use the SERVICE directly per https://wiki.blazegraph.com/wiki/index.php/FullTextSearch#SERVICE then there is no problem with nesting SEARCH SERVICE calls within a subquery.
        Hide
        beebs Brad Bebee added a comment -

        The workaround is below.

        This query does not work:

        Select ?sub where {
          { Select ?sub where {
             ?sub ?tmp ?match .
                   ?match bds:search 'text' .
              }  Limit 10
          }
        }
        

        This query does:

        Select ?sub where {
          { Select ?sub where {
             ?sub ?tmp ?match .
              SERVICE <http://www.bigdata.com/rdf/search#search> {
                   ?match bds:search 'text' .
                }
              }  Limit 10
          }
        }
        
        Show
        beebs Brad Bebee added a comment - The workaround is below. This query does not work: Select ?sub where { { Select ?sub where { ?sub ?tmp ?match . ?match bds:search 'text' . } Limit 10 } } This query does: Select ?sub where { { Select ?sub where { ?sub ?tmp ?match . SERVICE <http: //www.bigdata.com/rdf/search#search> { ?match bds:search 'text' . } } Limit 10 } }

          People

          • Assignee:
            michaelschmidt michaelschmidt
            Reporter:
            mikepersonick mikepersonick
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated: