Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lawson/fts #305

Merged
merged 23 commits into from
Nov 21, 2024
Merged

Lawson/fts #305

merged 23 commits into from
Nov 21, 2024

Conversation

recalcitrantsupplant
Copy link
Collaborator

@recalcitrantsupplant recalcitrantsupplant commented Nov 14, 2024

Creates a search query which is the union of:

  • One full text search query for all direct predicates e.g. ?focus_node rdfs:label "search term"; and
  • One full text search query PER shacl path defined as a https://prez.dev/ont/JenaFTSPropertyShape

Can run Fuseki FTS using python dev/dev-setup.py
Then query:
/search?q=*yue*&predicates=real&predicates=https://schema.org/headline&predicates=http://www.w3.org/2000/01/rdf-schema%23label
The inner select clause is of the form (for two direct predicates + one path):

      {
        {
          (?focus_node ?weight ?match ?g ?pred ) <http://jena.apache.org/text#query> (<https://schema.org/headline> rdfs:label "*yue*" )
        }
        UNION
        {
          (?fts_search_node ?weight ?match ?g ?pred ) <http://jena.apache.org/text#query> (<https://schema.org/description> "*yue*" ) .
          ?prof_101_node_1 <http://www.w3.org/ns/sosa/hasResult> ?fts_search_node .
          ?focus_node <http://www.w3.org/ns/sosa/isFeatureOfInterestOf> ?prof_101_node_1
        }
      }

Todo: add variables used in property path to selected variables so they are available to the construct query.

@lalewis1
Copy link
Collaborator

I've added blank node filtering such that if the focus node is a blank node then it will be removed from the search results.

I also dropped a few commits to remove the testcontainers data and dependency, which were causing some issues with git.

@recalcitrantsupplant recalcitrantsupplant deleted the lawson/fts branch November 21, 2024 00:01
@lalewis1 lalewis1 restored the lawson/fts branch November 21, 2024 00:02
@lalewis1 lalewis1 reopened this Nov 21, 2024
@recalcitrantsupplant
Copy link
Collaborator Author

recalcitrantsupplant commented Nov 21, 2024

looks good, only just occurred to me, I think isIRI in this case would be equivalent to !isBlank and probably a little less code. Can update later. Otherwise looks fine - go ahead and merge

@lalewis1 lalewis1 merged commit d5f5a2a into main Nov 21, 2024
1 check passed
@lalewis1 lalewis1 deleted the lawson/fts branch November 21, 2024 00:23
Copy link

🎉 This PR is included in version 4.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants