Skip to content

Instantly share code, notes, and snippets.

@simerplaha
Last active February 29, 2020 04:29
Show Gist options
  • Save simerplaha/df10f91af74158670fad81f81ec6b85b to your computer and use it in GitHub Desktop.
Save simerplaha/df10f91af74158670fad81f81ec6b85b to your computer and use it in GitHub Desktop.
import swaydb._
import swaydb.serializers.Default._

val sortedKeyIndex =
  SortedKeyIndex.Enable(
    prefixCompression = PrefixCompression.Disable(normaliseIndexForBinarySearch = true),
    enablePositionIndex = true,
    ioStrategy = IOStrategy.concurrentStored,
    compressions = _ => Seq.empty
  )

val map =
  persistent.Map[Int, String, Nothing, Bag.Less](
    dir = "myDir",
    sortedKeyIndex = sortedKeyIndex,
    binarySearchIndex = BinarySearchIndex.Disable(searchSortedIndexDirectly = true)
  )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment