GithubHelp home page GithubHelp logo

plv / azbuka Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 578 KB

A simple string indexing and full text search library for Kotlin

Kotlin 81.48% Assembly 0.04% HTML 3.83% CSS 6.13% JavaScript 8.52%

azbuka's People

Contributors

plv avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

azbuka's Issues

Refactor Tokenizable storage

Currently, Inodes store Tokenizable:

  • Directory stores them so that future children can inherit this tokenizer.
  • Document stores them because Document is also Tokenizable.

However, this can be roundabout. As my comment in Inode.kt explains:

// TODO:  Storing a Tokenizable in each Directory and Document is a bad idea. It wastes space with no real time benefits
// (esp. if API users may supply a tokenizer that is not a singleton). Also, this can leak if we accidentally keep
// references to a Tokenizable that is also a Document, even after we remove the Document from the DocumentStore.
// I'm crunched for time as of writing this comment, but the smarter thing to do would be to dynamic dispatch
// using a map of some sort.

Refactor FileTracker and batch its output

I wrote FileTracker before introducing the Inode framework, so it still works directly with raw Paths. The code is messier compared to everything else, and untested as well. So, the list of things we need for FileTracker is as follows:

  • Refactor to use Inodes instead of raw Paths
  • Add support for RENAMED_TO/RENAMED_FROM watch events
  • Write tests for FileTracker. Mocking this may be difficult with just JUnit tempDirectory -- using something like jimfs is preferred.
  • In IndexManager, refactor the event registration code so that we transact the events received from FileTracker in batches rather than individually. This should provide better safety and keep FileTracker better in sync with InodeStore and TokenIndex

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.