Pnp-modern-search: Search box WebPart has stopped working again same issue as mentioned in #347

Created on 7 Jul 2020  路  9Comments  路  Source: microsoft-search/pnp-modern-search

Version used
Ex: 3.7

Describe the bug
I think MS has done some changes in the Search API due to that the search box WebPart has stopped working again. We have fixed the issue with the fixed provided https://github.com/microsoft-search/pnp-modern-search/pull/348/files

To Reproduce

1) Add Search box web-part and search web-part
2) Try to search anything by typing any keyword in search box, the results are not refined.

Expected behavior
Keyword search should be working.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • IE11, Chrome, Mozilla Firefox

Additional context
When we trying to search anything from the keyword search, the results are not refined based on the keyword. We have checked the request payload and found that the keyword provided in the searchbox is converted to "". Hence the final Querytext":"".

Below is the payload

{"request":{"__metadata":{"type":"Microsoft.Office.Server.Search.REST.SearchRequest"},"ClientType":"ContentSearchRegular","Properties":{"results":[{"Name":"EnableDynamicGroups","Value":{"BoolVal":true,"QueryPropertyValueTypeIndex":3}},{"Name":"EnableMultiGeoSearch","Value":{"BoolVal":true,"QueryPropertyValueTypeIndex":3}}]},"Querytext":"*","EnableQueryRules":false,"QueryTemplate":"{searchTerms}","RowLimit":10,"SelectProperties":{"results":["Title","Path","Created","Filename","SiteLogo","PreviewUrl","PictureThumbnailURL","ServerRedirectedPreviewURL","ServerRedirectedURL","HitHighlightedSummary","FileType","contentclass","ServerRedirectedEmbedURL","DefaultEncodingURL","owstaxidmetadataalltagsinfo","Author","AuthorOWSUSER","SPSiteUrl","SiteTitle","IsContainer","IsListItem","HtmlFileType","UniqueID"]},"TrimDuplicates":false,"SortList":{"results":[{"Property":"Created","Direction":0},{"Property":"Size","Direction":1}]},"Refiners":"","HitHighlightedProperties":{"results":[]},"RefinementFilters":{"results":[]},"ReorderingRules":{"results":[]}}}

Most helpful comment

Hi guys,

I think I had the same issue. A few weeks ago we ran into the issue with Dynamic Data, where a page with Search/Refiner/Result/Paging webparts stopped working. We updated to 3.14.1, and everything started working again.

Then this morning my client reports that the exact same page has stopped working again. So I updated the webparts to 3.14.2, and it started working again.

All 9 comments

Not sure what bug you are reporting. If I drop a search box and a result webpart on a page and connect them, they work as expected. If you have fixed it with the PR you mention (which is in v3.14.1), then what is your issue? That PR is for #325 which is a known issue. The issue relates to SPFx and a fix is rolling out from Microsoft.

Hi @wobba,
Can you please provide details what SPFX fix is rolling out by Microsoft. Where I can find these details ?

@spo365 I don't have exact details, but should hit this week. Being tracked at https://github.com/SharePoint/sp-dev-docs/issues/5947

Hi @wobba ,

just to make sure I understand it correctly. The issue that a search request is not refined / always returns all results (probably due to an empty queryterm) is directly related to #325 which is why you closed #347 . Correct?

The underlying issue is currently fixed by Microsoft (https://github.com/SharePoint/sp-dev-docs/issues/5947), so we have to wait for this, which might however already happen this week.

Just wanted to make sure, I understand it correctly, since for me with v3.14.2 the connection to a dynamic source seems to work perfectly fine (this seems to be issue #325) but the results are not refined by the searchterm (which seems to be #347).

@wobba If we are using search service how come SharePoint search is working fine ?

@spo365 OOB search experience use internal API's, not SPFx.

Hi guys,

I think I had the same issue. A few weeks ago we ran into the issue with Dynamic Data, where a page with Search/Refiner/Result/Paging webparts stopped working. We updated to 3.14.1, and everything started working again.

Then this morning my client reports that the exact same page has stopped working again. So I updated the webparts to 3.14.2, and it started working again.

Hi @wobba,

I saw that you closed the underlying issue on SPFx side (SharePoint/sp-dev-docs#5947). Can you maybe tell me what to do (or wait for) to have it fixed on our side? We can still not refine our search results via the search query, which means we always get all documents on our sharepoint as search results.

Many thanks in advance!

hi @viness ,

you can use latest version release version, it is working fine for me.

Was this page helpful?
0 / 5 - 0 ratings