0

Hi I'm using SharePoint Online and the new version of SharePoint Site.

Most things work as expected and I've not had too many problems.

Unfortunatly I'm really struggling over the Search. I've got my context (_sp) and using the code examples provided.

 KeywordQuery keywordQuery = new KeywordQuery(_sp);
 keywordQuery.QueryText = vm.Search;
                        
        
 keywordQuery.StartRow = 0;

                      
SearchExecutor searchExecutor = new SearchExecutor(_sp);

ClientResult<ResultTableCollection> results = searchExecutor.ExecuteQuery(keywordQuery);
 _sp.ExecuteQuery();

This compiles and all works ok however I get no results back. All my tests using the REST API and on site SharePoint work ok. This, though goes through the _vti_bin/client.svc/ProcessQuery and despite trying to debug this with looking at the serialised query part.

<Query Culture=\"en-US\" EnableStemming=\"True\" EnablePhonetic=\"False\" EnableNicknames=\"False\" IgnoreAllNoiseQuery=\"True\" SummaryLength=\"180\" MaxSnippetLength=\"180\" DesiredSnippetLength=\"90\" KeywordInclusion=\"0\" QueryText=\"Housham\" QueryTemplate=\"\" TrimDuplicates=\"True\" Site=\"e9df3afe-01ea-4214-b91f-415458643633\" Web=\"b02cffd4-80f9-492d-ad21-f8e6aefe904b\" KeywordType=\"True\" HiddenConstraints=\" (NormSiteID:&quot;exxxxxx33&quot; OR SiteID:&quot;exxxxxxx33&quot;)\" />"

Which you can post into /_api/search/postquery no results are ever returned. I'm doing a full crawl which I'm hoping will give me something but at present I seem stuck.

Ideas?

1 Answer 1

0

Ok, long story short there is a problem in creating a site app categlog for a ste collection. https://www.c-sharpcorner.com/article/enable-site-collection-app-catalog-for-particular-site-collection-level-solution/

This seems to create some problems with duplicate fields and then knackers up a few fields - by creating duplicates (just what our systems team told me). This then knackers up calculated fields form page and this search tool.

Deleting the fields solves the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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