1 2 Previous Next 19 Replies Latest reply on Feb 27, 2013 8:04 AM by rhauch Go to original post
      • 15. Re: Full text search and text extractors
        rhauch

        That comment is correct for INNER JOIN, since they include only matches. But in an LEFT OUTER JOIN we should include the left tuple in the results (always with nulls for the right tuple), and in a RIGHT OUTER JOIN we should include the right tuple in the results (always with nulls for the left tuple).

         

        Doesn't that sound right?

        • 16. Re: Full text search and text extractors
          mmatloka

          Approximatelly I have the following types a, b, c. a has a field refB and refC referencing to types b and c. I add to JCR node1 and node2. Both of them has references to type B but not C!. I run full text search, looking for text contained in node type B name.

           

          The following query

          SELECT a.* FROM [my:a] as a FULL OUTER JOIN [my:b] AS b ON a.[refB] = b.[jcr:uuid] FULL OUTER JOIN [my:c] AS c ON a.[refC] = c.[jcr:uuid] WHERE CONTAINS(a.*,'expression') OR CONTAINS (c.*,'expresssion')

          returns both nodes!? (there is no object of type c in the system)

           

          SELECT a.* FROM [my:a] as a FULL OUTER JOIN [my:b] AS b ON a.[refB] = b.[jcr:uuid] FULL OUTER JOIN [my:c] AS c ON a.[refC] = c.[jcr:uuid] WHERE CONTAINS(a.*,'expression') OR CONTAINS (b.*,'expresssion')

          finds also both nodes, but it should find only one of them (according to searched expression).

          • 17. Re: Full text search and text extractors
            rhauch

            Are you sure you want to do a FULL OUTER JOIN? That will return all nodes of type 'a' whether or not they have a relationship to 'b' or 'c' nodes that satisfies the associated criteria.

             

            Seems to me that a regular INNER JOIN (or just JOIN) would work as you expect.

            • 18. Re: Full text search and text extractors
              mmatloka

              Same effects on INNER JOIN and JOIN. Interesting is that the previous two queries returns both nodes, but the following query does not return any node. Adding second contains have influence.

               

               

              SELECT a.* FROM [my:a] as a FULL OUTER JOIN [my:b] AS b ON a.[refB] = b.[jcr:uuid] FULL OUTER JOIN [my:c] AS c ON a.[refC] = c.[jcr:uuid] WHERE CONTAINS(a.*,'expression')


               

              • 19. Re: Full text search and text extractors
                rhauch

                I'd suggest trying different queries and looking at query plans to see what portions of the query cause problems. If that doesn't work, please create a self-contained test case that replicates the problem.

                1 2 Previous Next