I suspect you need to now provide a forth variable on the right hand side, e.g.

    ("term" ?facetFilters 0 100 false) smf:luceneQuery (?result ?score ?total ?homeGraph)

Holger


On 2021-08-03 2:14 am, Matt Goldberg wrote:
Hello-

I had been successfully using smf:luceneQuery before upgrading to EDG 7. If I run the example query you provided earlier in this thread

SELECT ?result ?score ?total
WHERE {
   ("term" ?facetFilters 0 100 false) smf:luceneQuery (?result ?score ?total)
}

in EDG or TBC 6.3.2, it works fine. If I run the same query in EDG/TBC 7.0.3, I get the following error: Failed to execute SPARQL request: java.lang.IndexOutOfBoundsException: Index 3 out of bounds for length 3

Any ideas why this might be happening?
Thanks.

On Tuesday, November 10, 2020 at 7:20:12 PM UTC-5 Matt Goldberg wrote:

    There's a few use cases we're looking at. At the moment, the
    primary use case involves a proof of concept regarding a global
    search that federates a free text query. We have some other
    systems that also support Lucene, so the idea is that at least all
    the basic operators would work (at least *, ?, OR, AND, NOT) to
    provide moderately consistent performance across systems. I wrote
    a SWP service that uses smf:luceneQuery, which does work nicely in
    terms of the query itself, but it does run into the challenges you
    mentioned above.

    On Tuesday, November 10, 2020 at 5:24:56 PM UTC-5 Holger Knublauch
    wrote:

        I guess that's true. Due to the nature of the "normal"
        requirements that this feature is used for, it will take the
        input string and post-process it beyond recognition, for
        example to inject the names of the target graphs, to split
        multiple words into AND and to wrap each term with * ... *.
        However, you can use OR in between words.

        What operators in particular do you need?

        Holger


        On 11/11/2020 3:27 AM, Matt Goldberg wrote:
        Hello-

        Is it true that textindex:query magic property cannot support
        the Lucene operators?

        Thanks.

        On Friday, November 6, 2020 at 1:06:59 PM UTC-5 Matt Goldberg
        wrote:

            Thanks for the heads up. I'll continue experimenting.

            On Thursday, November 5, 2020 at 6:49:55 PM UTC-5 Holger
            Knublauch wrote:

                Hi Matt,

                smf:luceneQuery is in fact the magic property that
                Search the EDG is using, but without knowing more
                about your specific use case I would say 'use with
                caution' as the magic property is really meant for
                use with in SWP and has some quirks.

                For example, the user must define a limit, facets are
                kind of a pain to pass through, target graphs must
                opt in, working copies are out of scope, and lastly
                all graphs in the index are queried - the only way to
                narrow the scope is by providing a graph facet.

                But generally speaking this should work
                (params are: search term, facets, offset, limit,
                advanced syntax (when true the magic property will
                use the input verbatim, essentially allowing lucene
                operands to be utilized)

                SELECT ?result ?score ?total
                WHERE {
                   ("term" ?facetFilters 0 100 false) smf:luceneQuery
                (?result ?score ?total)
                }

                If the user needs facets, we'd have to work up a more
                thorough example, which would involve temp graphs.

                So the alternative would be to use the
                textindex:query magic property while iterating over
                the properties of interest.

                Holger


                On 11/6/2020 12:12 AM, Matt Goldberg wrote:
                That magic property requires a specific property to
                search values of, which is not quite what I want at
                the moment. After digging some more, I found
                smf:luceneQuery which appears to return similar
                results to Search the EDG. Is there any caveats with
                using this magic property?

                On Wednesday, November 4, 2020 at 6:04:54 PM UTC-5
                Holger Knublauch wrote:

                    Hi Matt,

                    yes there are functions in the textindex
                    namespace (http://topbraid.org/textindex#
                    <http://topbraid.org/textindex#>)

                    Open the file \server.topbraidlive.org
                    <http://server.topbraidlive.org>\web\2018\textindex.ui.ttlx
                    in TBC to see their declarations.

                    The name of the index for EDG vocabularies is
                    "teamwork" - see the Text Indices admin page.

                    An example call would be

                        ("teamwork" rdfs:comment "hello")
                    textindex:query (?subject ?score ?literal ?graph)

                    If you have follow-up questions, please ask here.

                    Holger


                    On 11/5/2020 8:17 AM, Matt Goldberg wrote:
                    Hello-

                    Is there a mechanism like a magic property to
                    query the freetext index from SPARQL? I didn't
                    see one mentioned in the TopBraid
                    documentation. I've used some other systems
                    that have this feature.

                    Thanks.
-- You received this message because you are
                    subscribed to the Google Groups "TopBraid Suite
                    Users" group.
                    To unsubscribe from this group and stop
                    receiving emails from it, send an email to
                    [email protected].
                    To view this discussion on the web visit
                    
https://groups.google.com/d/msgid/topbraid-users/ac42f5bc-323f-4254-8027-20e166d9e264n%40googlegroups.com
                    
<https://groups.google.com/d/msgid/topbraid-users/ac42f5bc-323f-4254-8027-20e166d9e264n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- You received this message because you are subscribed
                to the Google Groups "TopBraid Suite Users" group.
                To unsubscribe from this group and stop receiving
                emails from it, send an email to
                [email protected].
                To view this discussion on the web visit
                
https://groups.google.com/d/msgid/topbraid-users/59e998be-8c2c-4e47-82e2-e9948acaa846n%40googlegroups.com
                
<https://groups.google.com/d/msgid/topbraid-users/59e998be-8c2c-4e47-82e2-e9948acaa846n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- You received this message because you are subscribed to the
        Google Groups "TopBraid Suite Users" group.
        To unsubscribe from this group and stop receiving emails from
        it, send an email to [email protected].
        To view this discussion on the web visit
        
https://groups.google.com/d/msgid/topbraid-users/e8a7ccb2-bf2f-4d16-a550-dcd6bb65c27fn%40googlegroups.com
        
<https://groups.google.com/d/msgid/topbraid-users/e8a7ccb2-bf2f-4d16-a550-dcd6bb65c27fn%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/b1757d75-60c2-4b8f-b74d-d40baffa249cn%40googlegroups.com <https://groups.google.com/d/msgid/topbraid-users/b1757d75-60c2-4b8f-b74d-d40baffa249cn%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "TopBraid 
Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/fcebb9cb-e3bd-0355-e5b1-7f56f60e254f%40topquadrant.com.

Reply via email to