Forum Discussion
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_EdingerBronze ContributorI 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!- MarioZagrebBrass Contributor
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??
- MarioZagrebBrass ContributorI found this:
*: The asterisk symbol, known as the search wildcard, broadens your search by returning results that include variations on the given term. Searching edu* returns results that include educate, educational, education, and any other words that begin with edu-.
Wildcards can only be used at the end of a word. You cannot begin a word with a wildcard. For example, you can’t search *smith in hopes of getting results that include blacksmith, goldsmith, silversmith, locksmith, and the like. But you can search smith* to get results that include Smith, Smithson, Smithsonian, and anything else that starts with Smith (likely a lot of people names).
Wildcards can only be used at the end of an exact phrase search.
Is this really true???