Comments (4)
We're not using MongoDB.
That said, it appears as though we could be using a PrefixSearch: https://psychonautwiki.org/w/api.php?action=query&list=prefixsearch&pssearch=LS&format=json. The only issue is that we're not working with a generic search endpoint but with a semantic search (based on meta data inside articles). I'll look into this.
from bifrost.
There's no such concept in MediaWiki and no resource shall be considered static. That said, substance names are sufficiently stable for them to be considered IDs. We always create redirects if a substance article is moved, and the API respects redirects.
Example: https://api.psychonautwiki.org/?query=query%7Bsubstances(query:%221plsd%22)%7Bname%7D%7D. The 1plsd
query implicitly aliases to 1P-LSD.
from bifrost.
That said, substance names are sufficiently stable for them to be considered IDs.
Cool!
Still, IMO we should also have some method of querying that gives results that partially matches the query (similar behavior to the wiki's search bar).
For example, if I search for "MD" (https://api.psychonautwiki.org/?query=query%7Bsubstances(query:%22MD%22)%7Bname%7D%7D), I should receive all of the following as results:
- MDMA
- MDA
- MDPV
- MDEA
- MDAI
Maybe use the $regex
selector? https://docs.mongodb.com/manual/reference/operator/query/#query-selectors
from bifrost.
Hello, any update on this? Im trying to use the Apollo/GraphQL endpoint for a project and would really like prefix/post search capability <3
from bifrost.
Related Issues (20)
- Documentation for how to use the API via CURL, query variables HOT 1
- Accessing with Apollo from localhost HOT 5
- Substance.summary returns empty string HOT 4
- Substances should have a "other names" property. HOT 8
- Some substances are returning an object instead of float for SubstanceRoaDose.treshold HOT 1
- [Query.substances] When no specific query is provided, returns error: Cannot destructure property `type` of 'undefined' or 'null'. HOT 2
- Substance class strings have trailing hash character HOT 6
- Unable to query API for 2C-B effects HOT 3
- Query.substances errors when `limit` argument is too high HOT 7
- After migration from Hermes to aion and upgrade to MW 1.33.0 queries some substance queries fail HOT 1
- Module integration HOT 1
- Internal server error when querying 'shrooms', resulting in no units HOT 5
- API is returning 502 response suddenly. Unable to fetch any substance information. HOT 1
- Query for substances can include experiences HOT 2
- Query for all substances missing substances that are in the dataset HOT 3
- -
- query experiences
- Query Effects of Subjective Effect Index (SEI)
- Group/filter effects by type
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bifrost.