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

Issue617 search by notation #950

Merged
merged 7 commits into from
Mar 9, 2020
Merged

Issue617 search by notation #950

merged 7 commits into from
Mar 9, 2020

Conversation

joelit
Copy link
Contributor

@joelit joelit commented Mar 6, 2020

Fixes #617

@joelit joelit added this to the 2.4 milestone Mar 6, 2020
@codecov
Copy link

codecov bot commented Mar 6, 2020

Codecov Report

Merging #950 into master will increase coverage by 0.04%.
The diff coverage is 68.96%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #950      +/-   ##
============================================
+ Coverage     57.68%   57.72%   +0.04%     
- Complexity     1489     1496       +7     
============================================
  Files            32       32              
  Lines          4178     4192      +14     
============================================
+ Hits           2410     2420      +10     
- Misses         1768     1772       +4     

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c13dee7...92f060c. Read the comment docs.

@joelit
Copy link
Contributor Author

joelit commented Mar 6, 2020

To test this feature, you need to add skos:searchByNotation "true"; for a vocab with notation codes. You also need set up lucene index for skos:notations (in /etc/fuseki/configuration/ or similar) in the same manner as in tests/fuseki-assembler.ttl, restart fuseki and load the data in the text index before trying it out:

<#entMap> a text:EntityMap ;
text:entityField "uri" ;
text:graphField "graph" ; ## enable graph-specific indexing
text:defaultField "pref" ; ## Must be defined in the text:map
text:uidField "uid" ;
text:langField "lang" ;
text:map (
# skos:prefLabel
[ text:field "pref" ;
text:predicate skos:prefLabel ;
text:analyzer [ a text:LowerCaseKeywordAnalyzer ] ]
# skos:altLabel
[ text:field "alt" ;
text:predicate skos:altLabel ;
text:analyzer [ a text:LowerCaseKeywordAnalyzer ] ]
# skos:hiddenLabel
[ text:field "hidden" ;
text:predicate skos:hiddenLabel ;
text:analyzer [ a text:LowerCaseKeywordAnalyzer ] ]
# skos:notation
[ text:field "notation" ;
text:predicate skos:notation ;
text:analyzer [ a text:LowerCaseKeywordAnalyzer ] ]
) .

@joelit joelit marked this pull request as ready for review March 6, 2020 09:27
@joelit joelit requested a review from osma March 6, 2020 09:27
Copy link
Member

@osma osma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some outstanding issues that we just covered face to face:

  • in the SPARQL query, the IF clauses for priorities are slightly off, the numbers are overlapping
  • the ?blabel variable is bound but never used, it could be dropped
  • last but not least, it's probably not a good idea to use an UNION of two kinds of jena-text queries; instead the language parameter should be passed another way

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 6, 2020

SonarCloud Quality Gate failed.

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 16 Code Smells

No Coverage information No Coverage information
8.0% 8.0% Duplication

@joelit
Copy link
Contributor Author

joelit commented Mar 6, 2020

Some outstanding issues that we just covered face to face:

  • in the SPARQL query, the IF clauses for priorities are slightly off, the numbers are overlapping
  • the ?blabel variable is bound but never used, it could be dropped
  • last but not least, it's probably not a good idea to use an UNION of two kinds of jena-text queries; instead the language parameter should be passed another way

I made the changes and tested the result. However, there should be some further work with how search results are sorted, as I didn't really go through the situation of displaying notation matches before hidden labels matches.

Copy link
Member

@osma osma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as performance of search operations doesn't regress badly, looks good to me!

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

Successfully merging this pull request may close these issues.

Support truncating notation in search
2 participants