lnx-search / lnx

⚡ Insanely fast, 🌟 Feature-rich searching. lnx is the adaptable, typo tollerant deployment of the tantivy search engine.
https://lnx.rs
MIT License
1.25k stars 46 forks source link

Issues with retaining index data between restarts #146

Closed ptming closed 7 months ago

ptming commented 8 months ago

I've been trying out lnx and it's great. However I noticed my index documents are not retained between restarts. I can see that the index configuration itself is restored on restart but the index contains no documents. I noticed that the tantivy files all seem to be getting written to a tmp directory that looks like /var/folders/r6/y3v948hd5xqcv_b8f_z38xm40000gn/T/.tmpZPbQT1/ which gets wiped when I shut the server down.

Is there a configuration change or command line option that I need to pass to change this behavior so my documents get retained?

ChillFish8 commented 8 months ago

What is your index config? Are you sure you are not using a temporary index?

ptming commented 8 months ago

@ChillFish8 I did not see anything in the documentation site about how to configure that, you can provide an example syntax? I ran it via cargo run as well as using docker.

ptming commented 7 months ago

@ChillFish8 can you assist? I'm just using the default cargo run and ingesting the demo data from the cli tool

ChillFish8 commented 7 months ago

Hi @ptming Sorry for the delay, the demo tool uses a pre-configured index which uses a temporary directory because it is designed to be spun up and down without worry. I would recommend manually creating an index with configurations specific to your use case. https://docs.lnx.rs/#tag/Managing-indexes

ptming commented 7 months ago

@ChillFish8 oooooh thank you, i see the storage_type values. Please disregard and thank you for your guidance