http://franz.com/ns/allegrograph/2.2/textindex/matchExpression
Perform AllegroGraph freetext expression queries.
Like the fti:match magic property, this magic property can be used in several ways:
?subject fti:matchExpression 'expression' .
will perform a freetext expression query for 'expression'
and bind ?subject
to the subject of each triple found.
(?subject ?textObject) fti:matchExpression 'expression' .
will act as the first but will also bind ?textObject
to the object of the triples found.
?subject fti:matchExpression ( 'expression' 'indexName' ) .
and
(?subject ?textObject) fti:matchExpression ( 'expression' 'indexName' ) .
will perform a freetext expression search using only the specified index.
You can also supply a third binding on the subject side of the magic property which will be bound to the predicate of each matching triple. For example,
(?s ?text ?predicate) fti:match 'phrase' .
will bind ?s
to each matching subject, ?text
to each matching object, and ?predicate
to each matching predicate.
Note that fti:matchExpression
expects an expression using the AllegroGraph freetext index syntax. For example
select ?x \{
(?x ?what) fti:matchExpression '(or "springfield" "netherlands")' .
\}
would find triples whose objects contained either "springfield" or "netherlands". See fti:match if you do not need the full expression grammar for your queries.
Notes
The following namespace abbreviations are used:
- fti - <http://franz.com/ns/allegrograph/2.2/textindex/>
- geo - <http://franz.com/ns/allegrograph/3.0/geospatial/>
- geofn - <http://franz.com/ns/allegrograph/3.0/geospatial/fn/>
- nd - <http://franz.com/ns/allegrograph/5.0/geo/nd#>
- ndfn - <http://franz.com/ns/allegrograph/5.0/geo/nd/fn#>
- sna - <http://franz.com/ns/allegrograph/4.11/sna/>
The SPARQL magic properties reference has additional information on using AllegroGraph magic properties and functions.