SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.24k stars 1k forks source link

Why does SharePoint converts string value to GUID while returning in a Search result? #9768

Open vishalshitole opened 3 months ago

vishalshitole commented 3 months ago

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

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?

image

cc: @wobba @VesaJuvonen

brianpmccullough commented 3 months ago

@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).

vishalshitole commented 3 months ago

@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.

image

wobba commented 3 months ago

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.

vishalshitole commented 3 months ago

@wobba I am using default 'Title' column with its respective default managed property (Title). No mapping from my side.

wobba commented 3 months ago

@vishalshitole are you able to set up a consistent repro in other tenants and list all the steps to repro?

vishalshitole commented 2 months ago

@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.

  1. Create a blank list in a SharePoint site.
  2. Add couple of items in the list where 'Title' column has following values - 2101b6ee5fef9000b8cd35979ff00000, 2101b6ee5fef9000c565b90143b20000.
  3. Wait for some time to get those crawled by SharePoint Search.
  4. Query the list using SharePoint Search API with simple query. I have used the Search Query Tool. See the screenshot below.
  5. Observe the results.

image

wobba commented 1 month ago

We're looking into this issue internally and will report back once we know more.