Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Search Rest API stop working Spfx solution

$
0
0

Hi All,

I am working on spfx solution using search-rest api to retrieve sites that are associated with HUb sites. The solution was working fine for the most part except for the last two days. 
Every time I create a new site and associated with the hub, its not rendering in the list items. I didn't have this issue until the last two days. Did Microsoft stop supporting the search api?
If I dissociated an existing site from the HUB is will be removed from the HUB and if I associated back it will get rendered, which is fine. 
But I am not sure why creating a new site is not working. 
This issue is happening both in workbench.aspx and .spkg solution on spo online.
Please, this is urgent and thanks for the help.

public render(): void {
  
    let outPut = '';
    axios.get(`mysposite/_api/search/query?querytext='contentclass%3dsts_site'&refinementfilters='departmentid:string("*0a7586b7-2787-4a08-942b-f6a352048455*"%2clinguistics%3doff)'&trimduplicates=false`)
      .then(res => {
        res.data.PrimaryQueryResult.RelevantResults.Table.Rows.map(cells => {
          console.log(cells.Cells[6].Value);
          outPut += `
         <li id="myLi" class="item">
          <a href ="${cells.Cells[6].Value}"> ${cells.Cells[3].Value}</a>
         </li>
         `;
          this.domElement.innerHTML = `
                  <div style="margin-left:100px;"  >
                  <h1 > Site Listing</h1>
                  <hr />
                  <input  type = text" id ="name" class="inputType" name= "name" placeholder ="Search..." style="-webkit-appearance: none;width: 50%;border: 34px;font-family: inherit;padding: 12px 0;height: 12px;
                  font-size: 16px;font-weight: 500;border-bottom: 2px solid #c8ccd4background: none;border-radius: 0;color: #223254;
                  transition: all .15s ease;"/>
                  <ul id= "ulList">
                    ${outPut}
                  </ul>
                  </div>  
                `;
                this.filterItems();
        });
      })
     }


Abenet


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>