1

I have a simple document library that contains 8000+ documents in it(invoices). User are searching with partial characters of invoice number.

Example: Search for "111840-QAP0150969-69" by entering "QAP0150969-69"

but SharePoint results is 0.

and the Strange thing is, If I remove '-' from partial Search criteria it returns exact invoice.

Could someone help me to figure it out what is going on here?

below is the query from Log file and I do not have any errors after these request.

eventSearchFlowDone: 0cbe723e-7916-4df0-a9af-e19566e0254c, (path:"http://xxxxxxxxxx/xx//New Binding Unit" OR DocumentLink:"http://xxxxxxxxxx/xx/New Binding Unit/" OR ParentLink:"http://xxxxxxx/xx/New Binding Unit/") AND (QAP0150969-69) -ContentClass=urn:content-class:SPSPeople, Microsoft.SharePointSearchProviderFlow, 64, xxxxxx-APP22.

  • Does it return any results if you enter "111840-QAP0150969" ? It is default sharepoint behaviour. – harshal gite Nov 17 at 8:19
  • @harshalgite No. It doesn't, any suggestion? – mzonerz Nov 17 at 9:08
2

SharePoint's crawl component splits 111840-QAP0150969-69 phrase into three searchable tokens: 111840, QAP0150969 and 69 because hyphen character (-) is used as a word breaker by default for English language. This means when you search by any of the tokens (111840, QAP0150969 or 69) you will get your result back. Querying QAP0150969 69 will also work because this translates to 'Search for an item which contains tokens QAP0150969 AND 69'. Also if you search by entire phrase 111840-QAP0150969-69, you will get your result back. Same applies for 111840-QAP0150969* (notice the last asterisk character). However, you will not get your results if you enter 111840-QAP0150969 or QAP0150969-69 because these are only parts of the phrase. It's the same thing if you try to search for terms kind or red in kindred. *QAP0150969-69 will also not work since asterisk is supported only at the end of search phrase in KQL.

  • Thank you Slaven!! Understood. – mzonerz Nov 18 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.