As you are using the Search controller, we need to check if the PI Web API Search Crawler is working properly. Is this working for other PI Points/Elements from the same PI Data Archive/PI AF Server? Or is this problem specific related to those 6 PI Points?
Please visit the administrative page https://yourwebserver/piwebapi/admin/search/database.html and make sure if all databases are crawler properly. If they already are crawled, please try to rebuild them and try to query again.
PI Web API 2016 was just released so I strongly recommend you to upgrade it as many known issues related to indexing are fixed.
Finally, if this problem persists, the best way to proceed is through OSIsoft TechSupport as they have more tools to deal with this kind of issue.
Hope this helps!
Hi Marco, thanks for your prompt reply. 2 out of the 6 PI Tags were working. I just used your link to check the database crawler status and indeed one of the databases was not properly crawled so I initiated the rebuild index operation on it and will update you on the outcome.
We have been in contact by email already regarding your issue. Thank you for posting it here.
You have anonymized your query but not the URL's in the response. Also the screenshot of PI System Explorer shows the name of your AF Server and the AF Database. If this is sensitive information, please consider generalizing or making certain pieces invisible.
Because your query uses search, a requirement to return correctly is that PI Index Search Crawler has successfully crawled eVision AF Database. Please verify the Crawler status by looking at Search Service Administration page e.g. https://myserver/piwebapi/admin/search/database.html
An alternative approach to look for the Element requires the AF Databases WebID but you can easily browse to it as follows:
- Start at https://myserver/piwebapi/ and click the AssetServers link
- Locate your AFServer if there show multiple and click the Databases link
- Locate your Database and click the Elements link which will bring up a list of the root Elements for the selected AF Database
- Copy the URL, add the following to the end ?nameFilter=21-HG-411&searchFullHierarchy=true and hit [Enter] to execute
- The response should now show your Element. Please verify the Path and select from the choice of links e.g. Attributes
With this you are "browsing" PI Web API until you get the desired information and even programmatically possible it demonstrates the power of the Index Search Crawler. So it's definitely worth fixing possible issues with the Index database.
Hi Gregor, this is indeed another way of doing it but it is adding an extra call to the piwebapi as follow:
- Call the endpoint with the tag number
- Get the attributes URL from the 1 step and call it
- Look for the attribute you want to display in your UI and then call the Value URL of that attribute to get the value of the specific PI Tag attribute
When I use the search piwebapi endpoint I only have to do 2 calls:
- Call the search/query and get the tag number with all the list of attributes and their webids. Look for the attribute that you want to display and get the WebID
- Call the streams/WebID/value endpoint using the WebID from step 1 to get the value from the PI Tag attribute
I am currently recrawling the database as it didn't do it since 21/04, is there a way of recrawling on a daily basis or you only need to do it once?
Thank you Gregor.
You don't get the news and changes without crawling and your Search Index becomes outdated soon. PI Index Search Crawler is a service supposed / intended to run 24*7.
You can configure the crawler service at https://myserver/piwebapi/admin/search/settings.html