this post was submitted on 20 Aug 2024
21 points (100.0% liked)

Self Hosted - Self-hosting your services.

11211 readers
15 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules

Important

Beginning of January 1st 2024 this rule WILL be enforced. Posts that are not tagged will be warned and if not fixed within 24h then removed!

Cross-posting

If you see a rule-breaker please DM the mods!

founded 3 years ago
MODERATORS
 

Say I have a large txt or CSV file with data I want to search. And say I have several files.

What is the best way to index and make this data searchable? I've been using grep, but it is not ideal.

Is there any self hostable docker container for indexing and searching this? Or maybe should I use SQL?

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 13 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

You can import CSV files directly into an SQLite database. Then you are free to do whatever sql searches or manipulations you want. Python and golang both have great SQLite libraries from personal experience, but I'd be surprised if there is any language that doesn't have a decent one.

If you are running Linux most distros have an SQLite gui browser in the repos that is pretty powerful.

[โ€“] [email protected] 1 points 3 weeks ago

I'd be surprised if there is any language that doesn't have a decent one.

Yeah, SQLite provides a library implemented in C. Because C doesn't require a runtime, it's possible for other languages to call into this C library. All you need is a relatively thin wrapper library, which provides an API that feels good to use in the respective language.