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] <mailto:[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/c2696a48-4f4d-8b8b-ac8a-33577530f87d%40topquadrant.com.

Reply via email to