-
Notifications
You must be signed in to change notification settings - Fork 2
Cleanup query string #93
Comments
I discussed this issue with @sdevalk today. Unfortunately, cleaning up (or: pre-processing) the search query is hard to do generically. Of your points, only
can be applied generically.
This will only work on specific configurations of Virtuoso.
This will only work for Virtuoso and fail to return results for non-Virtuoso sources such as CHT. Moreover, the last two points are quite invasive in the user’s queries and perhaps make the Network of Terms too smart: if sources support handling diacritics, we should let them do so. However, I agree that our CONSTRUCT queries are becoming too complex and hard to maintain. To resolve this, we could adopt an alternative approach where we have the Network of Terms applications prepare queries specifically geared towards and optimised for term source technologies. We can do so in two ways:
I prefer 2. It adds adds some redundant string replacement operations, but those should be negligible (and the adapter pattern would add some overhead, too). The benefit is that the knowledge of how to query specific term sources remains in the catalog of queries (that may be exposed in some admin UI later on) and doesn’t spill over in the application code. |
@sdevalk Will make an inventory of the query variants that we need. |
@ddeboer For further discussion: I've created an overview of the terminology sources that we currently query and the various preprocessing rules that we currently apply or that we could consider. The overview is in this Google Spreadsheet. So far I think we need three query variants:
|
Thanks @sdevalk, that’s really useful! So we end up with these three query types:
Does converting to lowercase influence the other queries? If not, we can probably reduce these to two query types by merging the first two, because removing whitespace definitely should not hurt the other queries. |
@ddeboer Good point. Lowercasing the search words does not influence the other queries, so we can continue with two query types/variants. |
🎉 This issue has been resolved in version 5.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
In order to make the sparql queries more simple and robust the query string should be cleaned up before passing to the query engine. At least the following steps could be done:
The text was updated successfully, but these errors were encountered: