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

Include option for exact match query #13

Open
andmor- opened this issue Sep 18, 2014 · 2 comments
Open

Include option for exact match query #13

andmor- opened this issue Sep 18, 2014 · 2 comments

Comments

@andmor-
Copy link

andmor- commented Sep 18, 2014

When searching for annotations referring to a certain target link, one uses a request in the format:
https:////webannotator/api/annotations?access=read&link=59d08e6a-5cd9-4aed-8aa4-7074c270e635
Which performs a full text search on the value of the XPath node 'annotation/targets/targetInfo/link/text()'.

This creates some complications:

  1. There is no reliable way to get a list containing just the annotations referring to an exact target URL. Any link that includes the searched link as substring, will also be displayed. e.g. if one annotates the address 'https://someserver.somedomain/products' and also 'https://someserver.somedomain/products/laptops', when requesting the list of annotations available for '/products', one will also get the annotations referring to '/products/laptops'.
    Suggestion: Allow differentiation between exact and partial match queries.
  2. The request parameter syntax ...'&link=59d08e6a-5cd9-4aed-8aa4-7074c270e635' actually suggests that an exact match query will be performed.
    Suggestion: Keep this syntax for exact match queries and create a new one for partial matches, e.g. '&linkFragment=59d08e6a-5cd9-4aed-8aa4-7074c270e635'
  3. Since it is a partial match query and the searched node 'annotation/targets/targetInfo/link/text()' is not included in the annotationInfoList result, it is not possible to know which kind of match made a certain result appear in the annotationInfoList result without further requesting that specific annotation in full.
    Suggestion: Include the searched node 'annotation/targets/targetInfo/link/text()' in the annotationInfoList result of partial match queries.
@olhsha
Copy link

olhsha commented Sep 30, 2014

Fixed partially by making filtered search on links an exact search. also added the parameter "matchMode", so the search request may looks like one of the follows:

GET api/annotations?link=Sagrada&matchMode=contains
GET api/annotations?link=http://nl.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia&matchMode=exact
GET api/annotations?link=http://nl.wikipedia.org/wiki&matchMode=starts_with
GET api/annotations?link=_Fam%C3%ADlia&matchMode=ends_with
GET api/annotations?link=http://nl.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia

The default mode (the very last example) is exact.

@olhsha
Copy link

olhsha commented Oct 2, 2014

fixing version deployed on lux16.

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

No branches or pull requests

2 participants