Forum Discussion
Indexing Sharepoint Online Site
Hello all ,
I'm trying to index a Sharepoint Website document library and i followed this tutorial.
https://docs.microsoft.com/en-us/azure/search/search-howto-index-sharepoint-online
Everything is working fine i have my skillset triggered and standard Sharepoint columns are retrieved.
My main issue is that i want to retrieve custom columns created in this library.
For exemple i have a colum displayed as "Document usage" , the technical name is "DocumentUsage" and as i saw in the documentation , to get custom fields, you need to specify it in the connection string of datasource created in Azure Search like below :
"container": { "name": "useQuery", "query": "includeLibrariesInSite=<a href="https://staubli.sharepoint.com/sites/S-S3G-Qualification/MESABetaASDB2;additionalColumns:DocumentUsage,UploadableDocument,DocumentFormat,Langage,TargetForUse,PaidContent,PublicationDate,Activity,TargetApplication,ProductCategory,SerialNumber,KeyWords"
And i made a mapping of the fields in my indexer like below :
{ "name": "sharepoint-indexer", "dataSourceName": "sharepoint-datasource", "targetIndexName": "sharepoint-index", "skillsetName": "skillset-sp", "fieldMappings": [{ "sourceFieldName": "metadata_spo_site_library_item_id", "targetFieldName": "id", "mappingFunction": { "name": "base64Encode" } }, { "sourceFieldName": "content", "targetFieldName": "content" }, { "sourceFieldName": "DocumentUsage", "targetFieldName": "document_usage" }, { "sourceFieldName": "UploadableDocument", "targetFieldName": "uploadable_document" }, { "sourceFieldName": "DocumentFormat", "targetFieldName": "document_format" }, { "sourceFieldName": "Langage", "targetFieldName": "language_sp" }, { "sourceFieldName": "TargetForUse", "targetFieldName": "target_for_use" }, { "sourceFieldName": "PaidContent", "targetFieldName": "paid_content" }, { "sourceFieldName": "PublicationDate", "targetFieldName": "publication_date" }, { "sourceFieldName": "Activity", "targetFieldName": "activity" }, { "sourceFieldName": "TargetApplication", "targetFieldName": "target_application" }, { "sourceFieldName": "ProductCategory", "targetFieldName": "product_category" }, { "sourceFieldName": "SerialNumber", "targetFieldName": "serial_number" }, { "sourceFieldName": "KeyWords", "targetFieldName": "key_words" } ], "outputFieldMappings": [ { "sourceFieldName": "/document/language", "targetFieldName": "language" }, { "sourceFieldName": "/document/content/keyphrases", "targetFieldName": "keyphrases" }, { "sourceFieldName": "/document/content/translated_text_en", "targetFieldName": "translated_text_en" }, { "sourceFieldName": "/document/content/translated_text_fr", "targetFieldName": "translated_text_fr" }, { "sourceFieldName": "/document/content/translated_text_sp", "targetFieldName": "translated_text_sp" }, { "sourceFieldName": "/document/content/translated_text_de", "targetFieldName": "translated_text_de" } ] }
My issue is that standard fields are retrieved but not the custom ones specified in the datasource query.
Do i have to put the technical names or the display names of the columns?
Is there a trick to retrieve special columns ?
Here you can see my columns are null 😞
Thanks in advance for help.
Regards
- Amjad Al-HusseiniCopper ContributorThere is a typo in your data source 'container' => 'query' field value. You have a colon after 'additionalColumns' (additionalColumns:DocumentUsage) and equal (=) must be instead.
Try with replacing additionalColumns:DocumentUsage with additionalColumns=DocumentUsage