• Login
  • Register

DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Search Service - partial matches before complete matches

You are not authorized to post a reply.
Sort:


New Member


Posts:9
New Member

    Hopefully I picked the right forum as I consider search results from Lucene might be a matter of DNN configuration.

    When entering the word 'julie' and requesting results from the /API/internalservices/searchService/search appears to return results from EasyDNNNews based on the word 'juli' with a higher proriity than results concerning users with a firstname of 'julie'. Please the attached screen print.
    Perhaps something to do with the configuration, so far I have tried setting different Custom Analyzer Types like  Lucene.Net.Analysis.StopAnalyzer and others within the DNN 9.8 Personabar Site Settings GUI, but without any luck.
    Or perhaps it is simply what is the expected behaviour although users might see the fact that partial matches be rated above complete matches more like a bug.

    Any help or ideas would be greatly appreciated

     



    Veteran Member


    Posts:269
    Veteran Member

      did you try to quote your query word, see https://www.lucenetutorial.com/lucene-query-syntax.html


      New Member


      Posts:9
      New Member

        Hello Sebastian
        Thanks for looking into this. I just tried with searchstrings like the two mentioned below:
        API/internalservices/searchService/search?search="julie"&pageIndex=1&pageSize=8&sortOption=0&culture=da-DK&_=1620028752667
        API/internalservices/searchService/search?search=%22julie%22&pageIndex=1&pageSize=8&sortOption=0&culture=da-DK&_=1620028752667
        but it apparently without any changes to the result that keeps on returning matches on 'juli' prior to the searchword of 'julie'. I would have thought the DNN internal services search api added the quotes at the backend.
        A change to the pageSize parameter from 8 to 10 gets the users with a firstname of 'Julie' at the end of the selection.
        You are not authorized to post a reply.

        These Forums are dedicated to discussion of DNN Platform.

        For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

        1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
        2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
        3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
        4. No Flaming or Trolling.
        5. No Profanity, Racism, or Prejudice.
        6. Site Moderators have the final word on approving / removing a thread or post or comment.
        7. English language posting only, please.

        Would you like to help us?

        Awesome! Simply post in the forums using the link below and we'll get you started.

        Get Involved