Hi Jean-Marc!

AFAIK using the weights to order results is intimately linked to the text
index querying.
If I want the top 10 results, the search must have the weights beforehand
otherwise I must get all the results to filter later.
This is the reason for using AnalyzingInfixSuggester.
Lucene 4_9_1
https://lucene.apache.org/core/4_9_1/suggest/org/apache/lucene/search/suggest/analyzing/AnalyzingInfixSuggester.html
Lucene 6_2_1
https://lucene.apache.org/core/6_2_1/suggest/org/apache/lucene/search/suggest/analyzing/AnalyzingInfixSuggester.html

I guess this is what you call "performance reasons" .

I don't see why you couldn't, in principle, do something like this:

SELECT ?s (COUNT(*) as ?count)
WHERE {
  ?s text:query "édu*" .
  ?s ?p ?o .
}
GROUP BY ?s
ORDER BY DESC(?count)
LIMIT 10

(note: untested query)

I'm sure it will get slow if the number of hits from the text index is more than a few dozen. But for a small number of results at a time, it might work.

As I wrote in the original post, "I'll have to implement also the callback
for updates
like class TextDocProducerTriples in Jena-text." .
http://jena.apache.org/documentation/javadoc/text/org/apache/jena/query/text/TextDocProducerTriples.html

Isn't that called only when the indexed triple changes (e.g. the one with rdfs:label or skos:prefLabel or whatever property you are indexing), but not when other data related to the same subject changes? So if new triples are added for the same subject, but its label is unchanged, then the text index won't see the update and thus the count of references/triples won't be updated either.

I may be wrong here, I'm not sure how the update tracking works.

-Osma


--
Osma Suominen
D.Sc. (Tech), Information Systems Specialist
National Library of Finland
P.O. Box 26 (Kaikukatu 4)
00014 HELSINGIN YLIOPISTO
Tel. +358 50 3199529
[email protected]
http://www.nationallibrary.fi

Reply via email to