lense not using external indexes

Anonymous avatarAnonymous created an issue

Hi,

it seems the unity lens does not consult external indexes as the GUI but only the default one. Supporting multiple indexes is a great feature of recoll and the unity lens would be a nice way to interact with recoll, so having it support also multiple indexes would be great. I guess the problem is that recoll.connect does not pass a extra_dbs= param with the list of configured external indices? (Not sure, though, where the list of external indices is stored; doesn't seem to be in ~/.recoll ..)

Comments (4)

  1. medoc

    As you noticed, the list of additional indices is just passed to the connect method, I think that there is an example in the recollq.py sample inside the source tree.

    I'm not sure that there is an interface in the Dash/Lens that would allow configuring it, but I'm certainly no Unity expert...

    The list from the GUI is stored in the "history" file inside recoll.conf (bad name, historical reasons, no pun). The interesting part looks like the following:

    [allExtDbs]
    0000000001 = L2RhdGEvcmVjb2xsL3JlY29sbC1wcm9kL3hhcGlhbmRi
    0000000002 = L2hvbWUvZG9ja2VzLy5yZWNvbGwtcGhvdG9zL3hhcGlhbmRi
    [actExtDbs]
    0000000001 = L2RhdGEvcmVjb2xsL3JlY29sbC1wcm9kL3hhcGlhbmRi
    

    The lists of all configured indices and active ones are under the "allExtDbs" and "actExtDbs" sections. The numbers have no meaning at all, just used to have separate keys. The value looks to be encoded in base64. If you want to parse it beware that long lines are folded with a backslash at the end.

    Another approach would be to store this inside a separate text file for the Lens, maybe as python code ? with whatever interface you want to hack for editing it - or just vi :)

    And yes, I'll add this for the todo for the next version. Only, if you want a solution before that, I think that you can just hack the lens code.

  2. medoc

    Fixed by the recently added rclconfig.py package and a Recoll Lens tweak. This will be in future releases, but it's easy to install manually if needed:

    • Get the python/recoll/recoll/rclconfig.py and desktop/unity-lens-recoll/recollscope/rclsearch.py files from the current source tree
    • Copy rclconfig.py to /usr/lib/python2.7/dist-packages/recoll/
    • Copy rclsearch.py to /usr/share/unity-lens-recoll/recollscope

    Restart the desktop or just kill the recoll unity daemon.

    The Recoll Lens searches should now behave according to what external indexes are activated from the Recoll GUI

  3. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.