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

Searching with spaces results in error #112

Open
1 of 2 tasks
svenvanderburg opened this issue Dec 24, 2020 · 4 comments
Open
1 of 2 tasks

Searching with spaces results in error #112

svenvanderburg opened this issue Dec 24, 2020 · 4 comments

Comments

@svenvanderburg
Copy link
Contributor

svenvanderburg commented Dec 24, 2020

This returns 2 results:

>>> results = client.find_nanopubs_with_text('Picoides')
>>> for result in results:
>>>    print(result)
{'np': 'http://purl.org/np/RAMzGwLotMRSQTHRCS15B6hvuYSyEupGnxZaFU3EmcItA', 'description': 'Inter-species interaction of Picoides villosus with Ips', 'date': '2020-12-24T10:51:43.931Z'}
{'np': 'http://purl.org/np/RAMzGwLotMRSQTHRCS15B6hvuYSyEupGnxZaFU3EmcItA', 'description': 'Picoides villosus', 'date': '2020-12-24T10:51:43.931Z'}

But this nothing:

>>> results = client.find_nanopubs_with_text('Picoides villosus')
  • Investigate whether this is on our side or nanopub server side
  • Raise issue server side or fix client side
@svenvanderburg
Copy link
Contributor Author

It seems like it is client side, see results for: http://grlc.nanopubs.lod.labs.vu.nl/api/local/local/find_nanopubs_with_text?text=Picoides%20vilosus

@svenvanderburg
Copy link
Contributor Author

There was already an issue for this: peta-pico/nanopub-api#2.

We should be able to solve this on our side. I see 2 solutions:

  1. by always using single quotation marks we only support a simple text search (which is the behavior I expected)
  2. add detailed information on how this works to the documentation

I would vote for 1, because I don't think there is any documentation for 2. Or is there @tkuhn ?

@tkuhn
Copy link
Member

tkuhn commented Jan 4, 2021

Yes, you need to add an "AND" like "Picoides villosus" or quotes around it. This is directly passed to the Virtuoso full-text search, so it's probably documented there.

@raar1
Copy link
Contributor

raar1 commented Jan 18, 2021

I also vote for 1, because it's the behaviour I would have expected. We can provide a different method for composing the Virtuoso style search string, although I would rather avoid something that is too dependent on the choice of triple store on the backend (will it always be virtuoso for every server?)

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

No branches or pull requests

3 participants