Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bo Jacobsen 606 posts 2404 karma points
    Oct 25, 2021 @ 07:12
    Bo Jacobsen
    0

    Umbraco 8 app setting key for Umbraco.Examine.LuceneDirectoryFactory

    Hi all.

    On https://our.umbraco.com/documentation/reference/config/webconfig/ it states

    Umbraco.Examine.LuceneDirectoryFactory

    The SyncTempEnvDirectoryFactory enables Examine to sync indexes between the remote file system and the local environment temporary storage directory. The indexes will be accessed from the temporary storage directory.

    This setting is required due to the nature of Lucene files and IO latency on Azure Web Apps.

    But can anyone explain me what the options are and what the options do?

    1. Examine.LuceneEngine.Directories.TempEnvDirectoryFactory, Examine
    2. Examine.LuceneEngine.Directories.SyncTempEnvDirectoryFactory, Examine
  • Kevin Meilander 82 posts 408 karma points c-trib
    Oct 27, 2021 @ 15:57
    Kevin Meilander
    100

    TempEnvDirectoryFactory sets the Examine directory where the index files live to be the %temp% directory on the server. For cloud hosting in Azure this is preferred since there is sometime a latency accessing things back to the actual file storage and can sometimes fail. However, when your site starts up on a new server, the temp directory will be empty so it will need to rebuild the index from scratch.

    SyncTempEnvDirectoryFactory sets the Examine directory to be the %temp% directory, but also syncs the data back to the main storage. Then if the site starts up on a new server, the temp directory is empty, but instead of rebuilding the index, it copies the index files from the file system into the temp directory and uses those for the searching. If the files aren't on the file system for some reason, it still would need to reindex stuff.

    Here are some details around the original feature requests from the Examine code repo:

    https://github.com/Shazwazza/Examine/issues/80

    https://github.com/Shazwazza/Examine/issues/69

    https://github.com/Shazwazza/Examine/issues/215#issuecomment-799784803

  • Bo Jacobsen 606 posts 2404 karma points
    Oct 28, 2021 @ 07:14
    Bo Jacobsen
    0

    Thank you Kevin.

    Do you know if there are more options then TempEnvDirectoryFactory and SyncTempEnvDirectoryFactory?

  • Kevin Meilander 82 posts 408 karma points c-trib
    Oct 28, 2021 @ 12:55
    Kevin Meilander
    0

    There is also the default provider, for when you don't set anything that will just use the file system.

    It also does looks like there used to be a SyncAspNetCodeGenDirectoryFactory which will sync from the standard file system storage to the ASP.NET temp/code gen folder for the current website. But looks like this is no longer supported.

    But I'm pretty sure those are the all available options.

    And technically, I think you could extend the examine directory factory interface and make your own one, if you had a need.

  • Bo Jacobsen 606 posts 2404 karma points
    Oct 29, 2021 @ 11:13
    Bo Jacobsen
    0

    Thank you for the information.

Please Sign in or register to post replies

Write your reply to:

Draft