Copied to clipboard

Flag this post as spam?

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


  • Adam Gärdelöv 8 posts 80 karma points
    Mar 07, 2023 @ 16:27
    Adam Gärdelöv
    0

    How do i set minimum query length in Examine?

    How do i set min query length in examine? I have tried setting it in appsettings like this:

    "Examine": {
        "LuceneDirectoryFactory": "SyncedTempFileSystemDirectoryFactory",
        "IndexSets": {
          "ExternalIndex": {
            "MinQueryStringLength": 2
          }
        }
      }
    

    Im using Umbraco version 11.2.0

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Mar 08, 2023 @ 08:11
    Dave Woestenborghs
    0

    Hi Adam,

    Can you tell me what you are trying to achieve. I don't think a MinQueryStringLength config option existed for examine.

    Dave

  • Adam Gärdelöv 8 posts 80 karma points
    Mar 08, 2023 @ 08:38
    Adam Gärdelöv
    1

    We noticed we didnt get any hits when we searched with less characters than 3. But it might have been another problem.

    Thanks anyways!

  • Markus Rytterkull 31 posts 182 karma points
    Nov 14, 2023 @ 14:02
    Markus Rytterkull
    0

    I could only search on 4 characters or more before I added a wildcard, then 3 characters worked.

     .ManagedQuery($"{query}*")
    

    I can see in the Examine.Lucine-source that queries are generated in different ways depending on how long the query is, but cannot see why searching on 2 characters doesn't work.

    https://github.com/Shazwazza/Examine/blob/release/4.0/src/Examine.Lucene/Indexing/FullTextType.cs

    Is there anyway to get around this issue and be able to search on two characters?

    Cheers :-)

Please Sign in or register to post replies

Write your reply to:

Draft