Relevance Search API
Relevance Search in Dynamics 365 is built on top of Azure Search, but since Microsoft manages the service for us on the back-end, we can't use the standard REST API to access it. However, there is an undocumented wrapper endpoint in Dynamics 365 that we can use which functions essentially the same as the Azure Search API!
Disclaimer: this is unsupported as there is no official documentation - it is provided for informational purposes only.
In order to use this endpoint, you must first have Relevance Search enabled. You can do this by going to Settings > Administration > System Settings, and enabling it on the General tab. Once you enable it, you will have to wait a little bit for the data to get synced over to Azure.
Once Relevance Search is ready, you can submit requests to the API!
GET https://organization.crm.dynamics.com/api/search/indexes/default/Entities | ||
Parameter | Required? | Example |
api-version | Yes | 9.0 |
search | No | Microsoft |
searchEntities | No | product |
facet | No | (@search.entityname,count:100),(product.price,interval:100) |
$top | No | 1 |
$skip | No | 50 |
$filter | No | product:price gt 100 |
$count | No | true |
Executing this request would return a response similar to this:
{
"@odata.count": 100,
"@search.fullsyncinprogress": false,
"value": [
{
"@search.score": 2.9922318,
"@search.highlights": {
"name": [
"{crmhit}Microsoft{/crmhit} Dynamics 365"
],
"vendorname": [
"{crmhit}Microsoft{/crmhit}"
]
},
"@search.entityname": "product",
"@search.objectid": "00000000-0000-0000-0000-000000000000",
"@search.objecttypecode": 1024,
"name": "Microsoft Dynamics 365",
"productnumber": "MSDYN365",
"price": 195,
"vendorname": "Microsoft"
}
],
"facets": {
"@search.entityname": [
{
"Type": "Value",
"Value": "product",
"Count": 100
}
],
"product.price": [
{
"Type": "Value",
"Value": 100,
"Count": 40
},
{
"Type": "Value",
"Value": 200,
"Count": 60
}
]
},
"warnings": [],
"errors": []
}
If you are executing this outside of Dynamics 365, you can pass in an Authorization header with the Bearer/OAuth token that has access to your Dynamics 365 resource. You can alter the fields returned in the response (i.e. facetable/filterable fields) by adding View Columns to the Quick Find view. Similarly, you can alter the searchable fields by adding Find Columns to the Quick Find view. See more here.
As far as I can tell, the API limits introduced in March do not apply to this endpoint.
You can find more documentation on the Azure Search Servicie API here. Note: this documentation talks about other parameters that do not appear to work through the Dynamics 365 wrapper, but it does cover facets and filters in more detail.
Comments
Can you add an example for rest api to search documents.
GiladFor example we have on dynamics 365 on line a table of documents that contain approximately 1 millions records. We need to search records according to the field “docName”. Let’s say to search all records that docName contain the word “letter” and “client”. How can we do that? Using regular search with operator like and % takes 30 seconds which is to much time.
Thanks.
Can you add an example for rest api to search documents.
GiladFor example we have on dynamics 365 on line a table of documents that contain approximately 1 millions records. We need to search records according to the field “docName”. Let’s say to search all records that docName contain the word “letter” and “client”. How can we do that? Using regular search with operator like and % takes 30 seconds which is to much time.
Thanks.
Please find example
VALERYGET https://ORG.crm.dynamics.com/api/search/indexes/default/Entities?api-version=9.0&search=pro&searchEntities=product
This is now GA:
Phil Colehttps://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/relevance-search
Pills prescribing information. Brand names. <a href="https://prednisone4u.top">can i buy prednisone pill</a> in US. Some trends of meds. Get information here.
ElsHJ<a href=https://bellamumma.com/bm-expert-5-ways-make-bed-like-luxe-hotel-bed/#comment-13600>All about drug.</a> <a href=https://bellamumma.com/food-taut/#comment-13601>Actual trends of pills.</a> <a href=https://amp.en.vaskar.co.in/translate/1?to=ru&from=en&source=Drugs%20information%20sheet.%20Short-Term%20Effects.%20%3Ca%20href%3D%22https%3A%2F%2Fviagra4u.top%22%3Egeneric%20viagra%20price%3C%2Fa%3E%20in%20USA.%20Everything%20news%20about%20medicament.%20Get%20now.%20%0D%0A%3Ca%20href%3Dhttps%3A%2F%2Falmohaimeed.net%2Fm%2Far%2F71%3EActual%20trends%20of%20drugs.%3C%2Fa%3E%20%3Ca%20href%3Dhttp%3A%2F%2Fafootincoldwater.com%2Fphpafic%2Fviewtopic.php%3Ff%3D6%26t%3D743%3EAll%20trends%20of%20drug.%3C%2Fa%3E%20%3Ca%20href%3Dhttps%3A%2F%2Faito.org%2Fwiki%2Findex.php%2FTalk%3AAdnan_sami_song_mp3_download_pagalworld%23Some_information_about_meds.%3ESome%20information%20about%20meds.%3C%2Fa%3E%20%20f11c1_e%20&result=%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water.com%20%2F%20phpafic%20%2F%20viewtopic.php%3Ff%3D6%26t%3D743%3E%D0%B2%D1%81%D0%B5%20%D1%82%D0%B5%D0%BD%D0%B4%D0%B5%D0%BD%D1%86%D0%B8%D0%B8%20%D0%BD%D0%B0%D1%80%D0%BA%D0%BE%D1%82%D0%B8%D0%BA%D0%BE%D0%B2.%3C%20%2F%20a%3E%20%3Ca%20href%3Dhttps%3A%2F%2Faito.org%2Fwiki%2Findex.php%2FTalk%3AAdnan_sami_song_mp3_download_pagalworld%23Some_information_about_meds.%3E%D0%BD%D0%B5%D0%BA%D0%BE%D1%82%D0%BE%D1%80%D0%B0%D1%8F%20%D0%B8%D0%BD%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%86%D0%B8%D1%8F%20%D0%BE%20%D0%BB%D0%B5%D0%BA%D0%B0%D1%80%D1%81%D1%82%D0%B2%D0%B0%D1%85.%3C%20%2F%20a%3E%20f11c1_e>Everything what you want to know about medicament.</a> db783_e
Pills information. Effects of Drug Abuse.
DavidSut<a href="https://methotrexate4u.top">where buy methotrexate</a> in US
Actual what you want to know about medicines. Read information now.
https://amp.en.vaskar.co.in/translate/1?to=ru&from=en&source=Pills%20information.%20What%20side%20effects%3F%20%0D%0Awhere%20to%20buy%20methocarbamol%20https%3A%2F%2Fmethocarbamol4u.top%20in%20Canada%20%0D%0AActual%20news%20about%20drugs.%20Get%20information%20here.%20%0D%0A%20%0D%0Ahttps%3A%2F%2F3s.ma%2F%3Ftopic%3Dif-non-essential-should-i-take-valtrex-t1122-mesenchymal-entailing-acid-constriction%26paged%3D51%23post-76470%20Best%20information%20about%20drug.%20https%3A%2F%2F50s-rockets.blog.ss-blog.jp%2F2011-05-09%3Fcomment_success%3D2021-01-09T23%3A53%3A20%26time%3D1610204000%20Some%20information%20about%20drug.%20http%3A%2F%2Falim.mn%2Farticle%2F1133%20Everything%20about%20medication.%20%20a792f6f%20&result=%D0%98%D0%BD%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%86%D0%B8%D1%8F%20%D0%BE%20%D1%82%D0%B0%D0%B1%D0%BB%D0%B5%D1%82%D0%BA%D0%B0%D1%85.%20%D0%9A%D0%B0%D0%BA%D0%B8%D0%B5%20%D0%BF%D0%BE%D0%B1%D0%BE%D1%87%D0%BD%D1%8B%D0%B5%20%D1%8D%D1%84%D1%84%D0%B5%D0%BA%D1%82%D1%8B%3F%20%D0%B3%D0%B4%D0%B5%20%D0%BA%D1%83%D0%BF%D0%B8%D1%82%D1%8C%20%D0%BC%D0%B5%D1%82%D0%BE%D0%BA%D0%B0%D1%80%D0%B1%D0%B0%D0%BC%D0%BE%D0%BB%20https%3A%2F%2Fmethocarbamol4u.top%20%D0%B2%20%D0%9A%D0%B0%D0%BD%D0%B0%D0%B4%D0%B5%20%D0%B0%D0%BA%D1%82%D1%83%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5%20%D0%BD%D0%BE%D0%B2%D0%BE%D1%81%D1%82%D0%B8%20%D0%BE%20%D0%BD%D0%B0%D1%80%D0%BA%D0%BE%D1%82%D0%B8%D0%BA%D0%B0%D1%85.%20%D0%9F%D0%BE%D0%BB%D1%83%D1%87%D0%B8%D1%82%D1%8C%20%D0%B8%D0%BD%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%86%D0%B8%D1%8E%20%D0%BC%D0%BE%D0%B6%D0%BD%D0%BE%20%D0%B7%D0%B4%D0%B5%D1%81%D1%8C.%20https%3A%2F%2F3s.ma%2F%3Ftopic%3Dif-non-essential-should-i-take-valtrex-t1122-mesenchymal-entailing-acid-constriction%26paged%3D51%23post-76470%20%D0%BB%D1%83%D1%87%D1%88%D0%B0%D1%8F%20%D0%B8%D0%BD%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%86%D0%B8%D1%8F%20%D0%BE%20%D0%BD%D0%B0%D1%80%D0%BA%D0%BE%D1%82%D0%B8%D0%BA%D0%B0%D1%85.%20https%3A%2F%2F50s-rockets.blog.ss-blog.jp%2F2011-05-09%3Fcomment_success%3D2021-01-09T23%3A53%3A20%26time%3D1610204000%20%D0%BD%D0%B5%D0%BC%D0%BD%D0%BE%D0%B3%D0%BE%20%D0%B8%D0%BD%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%86%D0%B8%D0%B8%20%D0%BE%20%D0%BD%D0%B0%D1%80%D0%BA%D0%BE%D1%82%D0%B8%D0%BA%D0%B0%D1%85.%20http%3A%2F%2Falim.mn%2Farticle%2F1133%20%D0%92%D1%81%D0%B5%20%D0%BE%20%D0%BB%D0%B5%D0%BA%D0%B0%D1%80%D1%81%D1%82%D0%B2%D0%B0%D1%85.%20a792f6f Actual what you want to know about medication. https://akarui-mirai.blog.ss-blog.jp/HONDA-JADE-RS-TD1-07?comment_success=2021-01-10T00:13:22&time=1610205202 Actual what you want to know about medication. http://alim.mn/article/276 Best what you want to know about drug. 7816f1a