Filebase icon indicating copy to clipboard operation
Filebase copied to clipboard

Simple index mechanism

Open nickbe opened this issue 5 years ago • 2 comments

Would it be possible to implement some sort of index mechanism? This way queries which refer to indexed fields would be found much faster.

nickbe avatar Sep 04 '18 07:09 nickbe

Hi @nickbe. Yes, love the idea. That is on the list of features to add. Though I'm not sure when I'll be able to implement it yet. I'm assuming a good idea would be to create a config variable, like index and you can define an array of fields. Then the first time it runs it builds the index, and then any updates/deletes would have to rebuild indexes, or clear them out and then rebuild the index on the next query.

timothymarois avatar Sep 04 '18 13:09 timothymarois

AFAIK, create index is to avoid scanning all documents to display the results.

I think to create index will be hard to implement because basically an array will loop from the first until the end and right now, the design of this project seems not possible.

Yes maybe there is another way but it may refactor the whole design of this project.

aalfiann avatar Feb 04 '19 08:02 aalfiann