Getting an error for a new property "The property 'xyz' does not exist on type 'search.documentFields'."

I have a created a product level property called “MultiBuy” which is of Boolean type , so whenever I do build index, following error is thrown -

System.AggregateException: One or more errors occurred. (StatusCode: BadRequest; Content:{"error":{"code":"","message":"The request is invalid. Details: The property 'f_multibuy' does not exist on type 'search.documentFields'. Make sure to only use property names that are defined by the type."}}; DocumentIds:bbae653b-4a22-48fa-a373-59a03f7994f3,05ad9f13-3f26-4536-87c9-62da9e6c2553,6187ee72-2e7d-422d-868c-fe0b500c7959) ---> VirtoCommerce.SearchModule.Core.Exceptions.SearchException: StatusCode: BadRequest; Content:{"error":{"code":"","message":"The request is invalid. Details: The property 'f_multibuy' does not exist on type 'search.documentFields'. Make sure to only use property names that are defined by the type."}}; DocumentIds:bbae653b-4a22-48fa-a373-59a03f7994f3,05ad9f13-3f26-4536-87c9-62da9e6c2553,6187ee72-2e7d-422d-868c-fe0b500c7959 ---> Microsoft.Rest.Azure.CloudException: The request is invalid. Details: The property 'f_multibuy' does not exist on type 'search.documentFields'. Make sure to only use property names that are defined by the type. at Microsoft.Azure.Search.DocumentsProxyOperations.IndexWithHttpMessagesAsync[T](IndexBatch`1 batch, SearchRequestOptions searchRequestOptions, Dictionary`2 customHeaders, CancellationToken cancellationToken, JsonSerializerSettings requestSerializerSettings, JsonSerializerSettings responseDeserializerSettings) at Microsoft.Azure.Search.DocumentsOperations.DoIndexAsync[T](IndexBatch`1 batch, SearchRequestOptions searchRequestOptions, Dictionary`2 customHeaders, JsonSerializerSettings jsonSettings, CancellationToken cancellationToken) at Microsoft.Azure.Search.DocumentsOperationsExtensions.IndexAsync[T](IDocumentsOperations operations, IndexBatch`1 batch, SearchRequestOptions searchRequestOptions, CancellationToken cancellationToken) at VirtoCommerce.AzureSearchModule.Data.AzureSearchProvider.IndexWithRetryAsync(String indexName, IEnumerable`1 providerDocuments, Int32 retryCount, Boolean partialUpdate) in /home/runner/work/vc-module-azure-search/vc-module-azure-search/src/VirtoCommerce.AzureSearchModule.Data/AzureSearchProvider.cs:line 336 --- End of inner exception stack trace --- at VirtoCommerce.AzureSearchModule.Data.AzureSearchProvider.ThrowExeption(CloudException cloudException, IList`1 providerFields, IEnumerable`1 providerDocuments) in /home/runner/work/vc-module-azure-search/vc-module-azure-search/src/VirtoCommerce.AzureSearchModule.Data/AzureSearchProvider.cs:line 512 at VirtoCommerce.AzureSearchModule.Data.AzureSearchProvider.IndexWithRetryAsync(String indexName, IEnumerable`1 providerDocuments, Int32 retryCount, Boolean partialUpdate) in /home/runner/work/vc-module-azure-search/vc-module-azure-search/src/VirtoCommerce.AzureSearchModule.Data/AzureSearchProvider.cs:line 351 at VirtoCommerce.AzureSearchModule.Data.AzureSearchProvider.InternalIndexAsync(String documentType, IList`1 documents, IndexingParameters parameters) in /home/runner/work/vc-module-azure-search/vc-module-azure-search/src/VirtoCommerce.AzureSearchModule.Data/AzureSearchProvider.cs:line 174 at VirtoCommerce.AzureSearchModule.Data.AzureSearchProvider.IndexAsync(String documentType, IList`1 documents) in /home/runner/work/vc-module-azure-search/vc-module-azure-search/src/VirtoCommerce.AzureSearchModule.Data/AzureSearchProvider.cs:line 77 at VirtoCommerce.SearchModule.Data.Services.IndexingManager.ProcessDocumentsAsync(IndexDocumentChangeType changeType, String[] changedIds, BatchIndexingOptions batchOptions, ICancellationToken cancellationToken) in /home/runner/work/vc-module-search/vc-module-search/src/VirtoCommerce.SearchModule.Data/Services/IndexingManager.cs:line 351 at VirtoCommerce.SearchModule.Data.Services.IndexingManager.ProcessChangesAsync(IEnumerable`1 changes, BatchIndexingOptions batchOptions, ICancellationToken cancellationToken) in /home/runner/work/vc-module-search/vc-module-search/src/VirtoCommerce.SearchModule.Data/Services/IndexingManager.cs:line 282 at VirtoCommerce.SearchModule.Data.Services.IndexingManager.ProcessConfigurationAsync(IndexDocumentConfiguration configuration, IndexingOptions options, Action`1 progressCallback, ICancellationToken cancellationToken) in /home/runner/work/vc-module-search/vc-module-search/src/VirtoCommerce.SearchModule.Data/Services/IndexingManager.cs:line 205 at VirtoCommerce.SearchModule.Data.Services.IndexingManager.IndexAsync(IndexingOptions options, Action`1 progressCallback, ICancellationToken cancellationToken) in /home/runner/work/vc-module-search/vc-module-search/src/VirtoCommerce.SearchModule.Data/Services/IndexingManager.cs:line 93 at VirtoCommerce.SearchModule.Data.BackgroundJobs.IndexingJobs.IndexAllDocumentsAsync(IndexingOptions options, ICancellationToken cancellationToken) in /home/runner/work/vc-module-search/vc-module-search/src/VirtoCommerce.SearchModule.Data/BackgroundJobs/IndexingJobs.cs:line 330 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.WaitAllCore(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) at VirtoCommerce.SearchModule.Data.BackgroundJobs.IndexingJobs.RunIndexJobAsync(String currentUserName, String notificationId, Boolean suppressInsignificantNotifications, IEnumerable`1 allOptions, Func`3 indexationFunc, PerformContext context, IJobCancellationToken cancellationToken) in /home/runner/work/vc-module-search/vc-module-search/src/VirtoCommerce.SearchModule.Data/BackgroundJobs/IndexingJobs.cs:line 322

I have tried this in two platforms and got same result. Please can you suggest what’s wrong here.
Platform Version - 3.253.1

Thanks.

@Aman From the error, I see, that property doesn’t exists in the index. Did you try index rebuild with delete?
Could you provide more details about product and properties? Any screenshots?

Restarting platform and index rebuild with delete worked.

Thanks for your response.

1 Like