Matt,

I have checked and we consider this API to be rather internal and it's undocumented for a reason :)

Would you be able to use GraphQL for what you want to achieve? What was your use case that you need those facets?

Holger


On 2021-08-04 1:48 pm, Holger Knublauch wrote:

Hi Matt,

I need to ask a colleague and we'll get back to you. Meanwhile, looking at the source code, it seems that ?facetFilters can be a resource that is the subject of

http://topbraid.org/saf/appliedfacet

and you can see low-level details of how those values are constructed from saf.ui.ttlx -> saf:buildAppliedFacetList

Holger


On 2021-08-03 10:34 pm, Matt Goldberg wrote:
That works, thanks.

What is the correct syntax for the facet filters? I haven't been able to find any examples anywhere.

On Mon, Aug 2, 2021, 8:23 PM Holger Knublauch <[email protected] <mailto:[email protected]>> wrote:

    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]
    <mailto:[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
    
<https://groups.google.com/d/msgid/topbraid-users/fcebb9cb-e3bd-0355-e5b1-7f56f60e254f%40topquadrant.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/CAGyojU2oPOiHobCR7%2BH8vOvstA4SVz1gq9xsCAZfN3JWSgnX%3DQ%40mail.gmail.com <https://groups.google.com/d/msgid/topbraid-users/CAGyojU2oPOiHobCR7%2BH8vOvstA4SVz1gq9xsCAZfN3JWSgnX%3DQ%40mail.gmail.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/437b44c8-61c3-e0f6-707c-b20adbad35ac%40topquadrant.com.

Reply via email to