This PR adds support for searching in multiple spaces.
One limitation is that the original 40 result limit is kept and no smarts are applied to try to pick the most relevant result(s). For this reason the secondary space results are simply appended after primary space results and may not show up at all if the primary space has >40 results.
Since search index for spaces are named as follows:
This PR adds support for searching in multiple spaces.
One limitation is that the original 40 result limit is kept and no smarts are applied to try to pick the most relevant result(s). For this reason the secondary space results are simply appended after primary space results and may not show up at all if the primary space has >40 results.
Since search index for spaces are named as follows:
SearchIndex_aaa111ff-faaa-3a3a-1a2a-8000eddd2eee.sqlite
SearchIndex_aaa111ff-faaa-3a3a-1a2a-8000eddd2eee||f0000d50-30ab-baba-9191-0000bbbbdf50.sqlite
I've relied on the
os.ReadDir
sort to guarantee that the "primary" space results are first.Edit: I also opted not to parallelize the search of multiple spaces for V1 of this PR, a followup PR could improve upon the performance.