Forum Discussion

MarioZagreb's avatar
MarioZagreb
Brass Contributor
Apr 04, 2023

SharePoint Search does not work

So, I have SP Online site with one document library. In that library I have many documents, but I have been struggling with the search functionality in that doc lib. So, here is my scenario:

 

I have document (PDF) with the following name:

HP LaserJet Pro M501, HP LaserJet Enterprise M507-M506, MFP M528-M527, Managed E50145-E50045, MFP E52645-E52545 service and support_4b0a28d5-a83f.pdf

And this text is the PDF name, in one of the metadata and in the document itself

 

Here are 3 search scenarios:

 

1. If I type "E52645" (without quotations marks) in search bar, I get 1 result - OK

2. If I type "52645" (without quotations marks) in search bar, I get nothing - NOT OK

3. If I type "52645*" (without quotations marks) in search bar, I get nothing - NOT OK

4. If I type "*52645*" (without quotations marks) in search bar, I get nothing - NOT OK

5. If I type "E52*" (without quotations marks) in search bar, I get 1 result - OK, but this means that I have to know the beginning of the word??

 

So it work ONLY if I write the exact word in the search bar or if I know the beginning of the word. But, users don't know the exact words in the document, only part of the words.

How can I search part of the word of that document???

  • Kelly_Edinger's avatar
    Kelly_Edinger
    Bronze Contributor
    I can't find an exact reference but I suspect your file name may be way too long. As a quick test, reduce the file name to only the most important information, remove spaces and commas, use underscores or dashes instead. Reindex the library it's sitting in and try your search again.

    Are you using the Title field as well? A lot of times that field sits empty in doc libraries, you could try putting data in that field as well and see if the results are better against title than file name.
    I hope that helps!
    • MarioZagreb's avatar
      MarioZagreb
      Brass Contributor

      Kelly_Edinger 

      Thank you for your answer, but the length of the file isn't the problem. And, also, yes, I am using the Title column and it has same text.

       

      Here is another (simple) example:

      I have 4 documents in my test doc lib with metadata column called "aaa":

      So, if I search fro term "77", I get nothing.

      If I search "77*", I get only 1 file.

       

      I can't get file with metadata "p77940", unless I start with "p77*"

       

      Another example:

      If I write "52" as a search term - I get NOTHING.

      If I write "52*" as a search term - I get NOTHING.

       

      But, when I write "852*" - i get the file.

       

      So, this means that SP search uses "startsWith" function for searching??

      How can I search the middle of the word??

       

      • LaraS7's avatar
        LaraS7
        Copper Contributor

        MarioZagreb I am having the exact same issues. Search is not returning the correct results. Anyone else have ideas on how to solve?

Resources