Comments (4)
When you say you're not sure whether sql.js supports "this" - relevancy? Sorting?
from guildwarsitembrowser.
Sqlite3 proper supports adding your own functions to rank search results, so you can display the most relevant ones first. See https://www.sqlite.org/fts3.html#matchinfo.
However, Sql.js currently provides no hook to register your own functions. See https://github.com/kripken/sql.js/issues/60.
If one were to implement registering your own functions in sql.js, those people would surely be happy to see you create a pull request for it.
from guildwarsitembrowser.
I've done custom functions for SQL.js. Now need to implement rank function. See https://www.sqlite.org/fts3.html#appendix_a for inspiration.
from guildwarsitembrowser.
Nicely done. I was thinking about what we can apply as a custom function.
If we only search on full words and we require each of the words to appear in the name for an item to be included then I think we have a super simple metric in the form of total string length (or even better, total word count).
Each result will have at least your query in and things that have more than that are less likely to be what you were after.
I'm going to implement that as a baseline. From there, I think it's our best bet would be to have a few keywords that bump things up the list (e.g. "dye") and/or weight things by their total trade volume (number of buy/sell orders). The latter would require hitting the API for up-to-date info, though doing that would also allow us to show current prices in the search results.
from guildwarsitembrowser.
Related Issues (20)
- Refactor price_tracker.js HOT 1
- Unhardcode the database location HOT 1
- Style and position properly HOT 1
- Fix the items database HOT 1
- Refesh the prices on the item list HOT 2
- Stop the app stealing focus away from the game HOT 5
- Use templates instead of generating HTML in javascript HOT 1
- Transparency. HOT 3
- Remove notification when you remove an item from the tracker HOT 1
- Incorrect pricing for some items HOT 1
- Sort button text HOT 1
- Item rarity and money colours HOT 2
- Fix the notifications HOT 3
- Remove crappy duplicated URLs HOT 1
- Default window sizes appear to be cack
- Maintain items order on the list HOT 2
- Make style.css less hellish HOT 1
- Compact mode HOT 3
- Graphs
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 guildwarsitembrowser.