Hi,I want to query specific property in Stardog database given a search term or phrase.What is the most efficient way to do this in Stardog? FILTER(regex(?title, 'foo', 'i')) turned out to be very slow.I tried textMatch but it is confusing and I am not sure how it works. Also the documentation does not give details of this feature.
Here is the query that I tried,PREFIX co: <http://example.com/ns/concepts#>PREFIX d: <http://example.com/ns/data#>SELECT *WHERE {?var1 a co:item ;co:name ?title .(?title ?score) <tag:stardog:api:property:textMatch> ('foo' 0.5 20) .}The confusing part is this query returns only 6 results, although there are many results for the term 'foo' (these are returned by FILTER/regex but it is slow).
I tried to use wildcards but leading wildcard gave an error that it is not supported. When I used trailing wildcard I got the same 6 results.
How to properly use textMatch? What configuration is required to setup text search?I just specified [search.enabled=true] option when creating database. Is it enough? Are there more ways to make queries efficient like configuration for indexes?
--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
Hi Mike,Thank you for quick reply.1. What do you think is missing from the docs?
Hi Mike,
Here are my comments,1. What do you think is missing from the docs?In my opinion more examples with different scenarios would help. For example, a full text search query, one combined with normal sparql query. But this question is tricky for me because I am not sure what all is possible with this feature.
2. About full text search:Perhaps it would help if I explain what I want to do. Given a search term I want to scan a particular property (for example title) for matches. Can I use textMatch in this scenario or is it designed to do a search on all data? FILTER/regex does not return under 1 second for this kind of query.
3. Score:How score is calculated? Does it only consider match in triple or does it take into account occurrences across all related triples?
Is it possible to do exact match with textMatch? For example match exactly 'foo'?
The query that I tried by default does a wildcard match?