Giter Site home page Giter Site logo

Comments (6)

nrc avatar nrc commented on June 17, 2024

One thing is that the notes field is excluded from search. That can easily be fixed (I excluded it because I thought it would bring up a whole bunch of bad results, but people don't seem to be using the notes section too heavily, so it seems that won't be an issue) and I should do that.

The other thing here is having a smarter search algorithm - the current tactic is really dumb. Obviously fixing this will take some effort (the right way to do this is to use a more search oriented backend - e.g., ElasticSearch, rather than SQLite, but that is more effort than I want to get into). I wonder if we could tweak search without too much effort, e.g., by just splitting search strings on spaces.

from rustaceans.org.

Aatch avatar Aatch commented on June 17, 2024

@nick29581 I don't think something like ElasticSearch is necessary. Postgres has some pretty decent string searching capabilities and will likely be much easier to set up. Also, much easier to move from SQLite to Postgres than to ElasticSearch.

Somehow I think that using the same engine that Wikipedia does is overkill for rustaceans.org 😁

from rustaceans.org.

lambda-fairy avatar lambda-fairy commented on June 17, 2024

Can't we just load all the JSON files into a HashMap and skip the database altogether? Even SQLite seems overkill for a read-only site with < 100 users.

Hash indexes and prefix matching aren't hard to implement manually. Even a dumb linear search would work fine for a few orders of magnitude beyond what we have now.

from rustaceans.org.

nrc avatar nrc commented on June 17, 2024

We could, but that would make the backend a lot more stateful than it is at the moment. Currently, there is no in-memory state, which is nice, but not essential.

from rustaceans.org.

lambda-fairy avatar lambda-fairy commented on June 17, 2024

What kind of statefulness are you thinking of?

I see that the GitHub daemon, after merging an entry, inserts the new data into the database itself. With a database-less system, we can instead have the daemon update the data on disk (git pull, maybe), then ask the HTTP server to reload everything from there (POST /reload).

At this point the changes would probably amount to a rewrite though, so I'm not so sure.

from rustaceans.org.

nrc avatar nrc commented on June 17, 2024

I guess I was imagining that on start up the daemon would read everything from disk into memory and would keep running forever. Then the in memory hashmap is preserved between accesses of the backend. I don't suppose that would be too bad since it is unlikely the program/hashtable would get corrupted, and it would mean we never need to worry about re-constructing the DB. But yeah, it would be pretty much a re-write.

from rustaceans.org.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.