sp-dev-docs
sp-dev-docs copied to clipboard
Why does SharePoint converts string value to GUID while returning in a Search result?
What type of issue is this?
Question
What SharePoint development model, framework, SDK or API is this about?
SharePoint REST API
Target SharePoint environment
SharePoint Online
What browser(s) / client(s) have you tested
- [ ] 💥 Internet Explorer
- [ ] 💥 Microsoft Edge
- [ ] 💥 Google Chrome
- [ ] 💥 FireFox
- [ ] 💥 Safari
- [ ] mobile (iOS/iPadOS)
- [ ] mobile (Android)
- [X] not applicable
- [ ] other (enter in the "Additional environment details" area below)
Additional environment details
SharePoint Search REST API
Issue description
I have a simple list with default 'Title' column (Single line of text). I am storing an alpha numeric string as a value of that column. But, when I search for list item(s), I get results with Title managed property having the string value converted to GUID. Why is this happening? Am I missing something?
cc: @wobba @VesaJuvonen
@vishalshitole does the search query work if you do something like: Title="[Original List Item Text Value]"? Or do you have to search on the "altered" value (i.e. the value including dashes).
@brianpmccullough Search query does not work for the original list item text value. It only works for the altered (including dashes) value. Please see below screenshot.
Could be you have some funky crawled property to managed property mapping happening? And the guid does not look like some 128bit representation of a string to me.
@wobba I am using default 'Title' column with its respective default managed property (Title). No mapping from my side.
@vishalshitole are you able to set up a consistent repro in other tenants and list all the steps to repro?
@wobba Sorry for the late reply, as I was occupied with other assignments.
Yes. I was able to reproduce the issue in couple of tenants. Following are the steps to reproduce it.
- Create a blank list in a SharePoint site.
- Add couple of items in the list where 'Title' column has following values - 2101b6ee5fef9000b8cd35979ff00000, 2101b6ee5fef9000c565b90143b20000.
- Wait for some time to get those crawled by SharePoint Search.
- Query the list using SharePoint Search API with simple query. I have used the Search Query Tool. See the screenshot below.
- Observe the results.
We're looking into this issue internally and will report back once we know more.
@wobba I created a support ticket with Microsoft for this one, and got the below response/resolution. Sharing in case you or anybody else has any inputs/thoughts.
The overwhelming majority of situations where you have a 32-bit hexadecimal alphanumeric code, that code would be a GUID, this issue hasn’t been encountered before. If it does happen again, we will have a much better story for creating this kind of documentation in the future. For now, let this be your official documentation of the behavior.
Symptom: When searching for an alphanumeric code, you were getting the results displayed as a GUID. Cause: This is by design. Search will cast all 32-bit hexadecimal codes as GUIDS. Resolution: Create a separate Managed Property of type text, and search using that property, and things will return normally.
@vishalshitole I don't quite get the response as the property you had is already of type text. Can you try to map title to a RefinableString property and see if this resolves it or not?
Hello @vishalshitole, Thank you for bringing this issue to our attention. Could you please confirm if the issue still persists for you?
We are closing this issue for now. If the problem persists, feel free to reopen it or open a new one.