You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Hendrik Jilderda | ASERVO Software <hj...@aservo.com.INVALID> on 2024/04/05 09:06:41 UTC

Re: Symlink indexing

The current implementation i have uses a dockerfile.
The dockerfile starts the solr container by using a custom script which is ran within the container.
the script does the following:

  *
checks at the base of the archive which directories are there and which need to be indexed.
  *
starts solr local (/opt/solr/docker/scripts/start-local-solr )
  *
for each directory found earlier:
     *
create core
     *
add request handler (code block below)
     *
reload core
     *
index (    /opt/solr/bin/solr post -recursive 50 -c "${CORE_NAME}" /app/archiveroot/"${CORE_NAME}"   )
  *
stop solr local
  *
start solr with  existing entrypoint from solr container ( /opt/solr/docker/scripts/docker-entrypoint.sh
exec solr-foreground)

I hope this is enough detail, if not please let me know.

Kind regards,
Hendrik





-------

    curl -X POST -H 'Content-type:application/json' -d '{
        "add-requesthandler": {
            "name": "/update/extract",
            "class": "solr.extraction.ExtractingRequestHandler",
            "defaults":{ "lowernames": "true", "captureAttr":"true", "FollowSymlinks": true}


        }
        }' $SOLR_CONFIG_URL





________________________________
From: Gus Heck <gu...@gmail.com>
Sent: Tuesday, March 19, 2024 1:25 PM
To: users@solr.apache.org <us...@solr.apache.org>
Subject: Re: Symlink indexing

Though many of us will likely be happy to help, we'll need you to back up
and give us some detail. There are multiple ways to index data into solr.
Most of them are not part of solr, but separate tools, and custom tools and
code are very common solutions. Can you describe the detailed steps you
took that lead to the problem? As it stands your question is unanswerable
because we don't know *how* you are indexing the files.




On Tue, Mar 19, 2024 at 5:22 AM Hendrik Jilderda | ASERVO Software
<hj...@aservo.com.invalid> wrote:

> Hi,
>
> For my current project i am expected to build a search function for an
> archive with the help of Solr.
>
> a part of the structure of this archive is:
> /data/.../...
>    file/
>        some.file
>
> /html/../../
>    file (symlink to /data/.../.../file/)
>    index.html
>
> the search should index all the files within the html directory including
> the symlinked ones.
> To my understanding symlinks are not automatically followed, so i searched
> online and found a suggestion to add
> ```
> <str name="enable.symlinks">true</str>
> ```
>
> to the config tag within the solfconfig.xml file. I did so but did not
> manage to get the indexing of symlinks working.
>
> What is the best option to enable this symlink indexing?
>
> Kind regards,
> Hendrik
>


--
http://www.needhamsoftware.com (work)
https://a.co/d/b2sZLD9 (my fantasy fiction book)