Failed to build synonyms

I am getting mainly 2 types of errors in log.

2022-05-18 16:47:55.0451 [App:01] [] [ERROR] [.NET ThreadPool Worker] 
Litium.Search.IndexNamingService - Could not create index 
docmentname-dev-categorydocument.sv-fi. 
ServerError: 400
Type: illegal_argument_exception 
Reason: "failed to build synonyms" 
CausedBy: "Type: illegal_argument_exception Reason: "failed to get synonyms : 
http://site.local:9210/api/container/4a181197-9ff1-43df-b1e1-86ccbf75759a/d8bd5d48-564c-4838-b699-b082f10078bc/solr" 
CausedBy: "Type: null_pointer_exception Reason: """" 

and next one is

[App:01] [] [ERROR] [.NET ThreadPool Worker] Litium.Search.Indexing.IndexQueueService - 
Error in building index document for Litium.Accelerator.Search.CategoryDocument with b7587b17-e99e-4fcd-ae7e-436764d8f2ed and "Index",
 {"id":"CategoryDocument:b7587b17-e99e-4fcd-ae7e-436764d8f2ed", "primaryTerm":18, "sequenceNumber":541949, "version":8291}: 

"Request failed to execute. Call: Status code 400 from: 
PUT /docmentname-dev-categorydocument.sv-fi. 
ServerError: Type: illegal_argument_exception Reason: 
"failed to build synonyms"
CausedBy: "Type: illegal_argument_exception Reason: "failed to get synonyms : 
http://site.local:9210/api/container/4a181197-9ff1-43df-b1e1-86ccbf75759a/d8bd5d48-564c-4838-b699-b082f10078bc/solr" 
CausedBy: "Type: null_pointer_exception Reason: """"" 

Elasticsearch.Net.ElasticsearchClientException: Request failed to execute. 
Call: Status code 400 from: PUT /docmentname-dev-categorydocument.sv-fi. 
ServerError: Type: illegal_argument_exception Reason: "failed to build synonyms" 

CausedBy: "Type: illegal_argument_exception 
Reason: "failed to get synonyms : 
http://site.local:9210/api/container/4a181197-9ff1-43df-b1e1-86ccbf75759a/d8bd5d48-564c-4838-b699-b082f10078bc/solr" 
CausedBy: "Type: null_pointer_exception Reason: """"

   at Litium.Search.SearchExtensions.EnsureSuccessStatusCode[T](T response)
   at Litium.Application.Search.IndexNamingServiceImpl.ConfigurateIndex(String indexName, 
IIndexMappingConfiguration configuration, CultureInfo cultureInfo)
   at Litium.Application.Search.IndexNamingServiceImpl.<>c__DisplayClass9_1.<GetCurrentIndexName>b__1()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
--- End of stack trace from previous location ---
   at System.Lazy`1.CreateValue()
   at Litium.Common.RetryableLazy`1.get_Value()
   at System.Lazy`1.CreateValue()
   at Litium.Common.RetryableLazy`1.get_Value()

   at Litium.Application.Search.IndexNamingServiceImpl.GetCurrentIndexName(String index, CultureInfo cultureInfo)

   at Litium.Search.IndexNamingServiceExtensions.GetCurrentIndexName[T](IndexNamingService 
indexNamingService, CultureInfo cultureInfo)
   at Litium.Search.Indexing.MultilingualIndexDocumentBuilderBase`1.<Index>b__2_0(ValueTuple`2 x)
   at System.Linq.Enumerable.SelectEnumerableIterator`2.ToList()
   at Litium.Search.Indexing.IndexWriterQueueItem..ctor(IndexAction action, IndexQueueItem indexQueueItem, IEnumerable`1 items)
   at Litium.Search.Indexing.MultilingualIndexDocumentBuilderBase`1.Index(IndexQueueItem item)
   at Litium.Application.Search.IndexNamingServiceImpl.GetCurrentIndexName(String index, CultureInfo cultureInfo)
   at Litium.Search.IndexNamingServiceExtensions.GetCurrentIndexName[T](IndexNamingService indexNamingService, CultureInfo cultureInfo)
   at Litium.Search.Indexing.MultilingualIndexDocumentBuilderBase`1.<Index>b__2_0(ValueTuple`2 x)
   at System.Linq.Enumerable.SelectEnumerableIterator`2.ToList()
   at Litium.Search.Indexing.IndexWriterQueueItem..ctor(IndexAction action, IndexQueueItem indexQueueItem, IEnumerable`1 items)
   at Litium.Search.Indexing.MultilingualIndexDocumentBuilderBase`1.Index(IndexQueueItem item)
   at Litium.Application.Search.IndexNamingServiceImpl.GetCurrentIndexName(String index, CultureInfo cultureInfo)
   at Litium.Search.IndexNamingServiceExtensions.GetCurrentIndexName[T](IndexNamingService indexNamingService, CultureInfo cultureInfo)
   at Litium.Search.Indexing.MultilingualIndexDocumentBuilderBase`1.<Index>b__2_0(ValueTuple`2 x)
   at System.Linq.Enumerable.SelectEnumerableIterator`2.ToList()
   at Litium.Search.Indexing.IndexWriterQueueItem..ctor(IndexAction action, IndexQueueItem indexQueueItem, IEnumerable`1 items)
   at Litium.Search.Indexing.MultilingualIndexDocumentBuilderBase`1.Index(IndexQueueItem item)
   at Litium.Application.Search.Indexing.IndexQueueServiceImpl.ProcessItem(IHit`1 doc, Action`1 bulkDescriptor)
   at Litium.Application.Search.Indexing.IndexQueueServiceImpl.<>c__DisplayClass16_0.<<ProcessQueue>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Litium.Application.Search.Indexing.IndexQueueServiceImpl.ProcessItem(IHit`1 doc, Action`1 bulkDescriptor)
   at Litium.Application.Search.Indexing.IndexQueueServiceImpl.<>c__DisplayClass16_0.<<ProcessQueue>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Litium.Application.Search.Indexing.IndexQueueServiceImpl.<>c__DisplayClass16_0.<<ProcessQueue>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Litium.Application.Search.Indexing.IndexQueueServiceImpl.<>c__DisplayClass16_0.<<ProcessQueue>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Litium.Application.Search.Indexing.IndexQueueServiceImpl.<>c__DisplayClass16_0.<<ProcessQueue>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Litium.Application.Search.Indexing.IndexQueueServiceImpl.<>c__DisplayClass16_0.<<ProcessQueue>b__0>d.MoveNext()

I assume this has to do with some value being null as I could see null_pointer_exception in the logs.
Is there any way to find out what is going wrong ?

Litium version: 8.3.1

Most probably is that your domain name site.local not are reachable from the docker instance of elasticsearch.

Is the site-local resolved to 127.0.0.1 or the computers actual IP? It may work if you using the computers actual IP instead of 127.0.0.1 and the reason is that if the container can resolve this using the hosts host-file the localhost-address will be resolved to the container itself, not to the other container that listen on the other port.

To avoid this you can use the localtest.me domain and the setup with the dns-resolver as it is described here to make the all the sub-domains for the localtest.me point to the 127.0.0.1 when running on the computer itself but when the request is from inside the container it will be resolved to the computers address instead.

hi, thanks for your reply,
I had forgot to mention that,
I had renamed the url, to site.local => it points to real url, and its reachable.
image

More debugging and I found that this issue is caused because the document was not existing in the elastic.

When I created the document “docmentname-dev-categorydocument.sv-fi” this error is gone, and works as it should.

I was wondering why would it not create the document if it does not exist.
I have to create documents for each languages manually.

Any suggestions where to look ?

Below is the error that I get now, after adding all indices manually.
I have single product that is indexed on this “document-dev-productdocument.sv-se”

FailureReason: MaxTimeoutReached while attempting POST on http://ds2-dev38.333.local:9200/document-dev-productdocument.sv-se/_search?typed_keys=true

Audit trail of this API call:

OriginalException: Elasticsearch.Net.ElasticsearchClientException: Maximum timeout reached while retrying request. Call: Status code 400 from: POST /document-dev-productdocument.sv-se/_search?typed_keys=true. ServerError: Type: search_phase_execution_exception Reason: “all shards failed” CausedBy: “Type: illegal_argument_exception Reason: “Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [articleNumber] in order to load field data by uninverting the inverted index. Note that this can use significant memory.” CausedBy: “Type: illegal_argument_exception Reason: “Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [articleNumber] in order to load field data by uninverting the inverted index. Note that this can use significant memory.”””

at Litium.Search.SearchExtensions.EnsureSuccessStatusCode[T](T response)
at Litium.Application.Search.SearchClientServiceImpl.SearchAsync[T](CultureInfo culture, Func2 descriptor) at Litium.Accelerator.Search.Searching.ProductSearchServiceDecorator.SearchAsync(SearchQuery searchQuery, IDictionary2 tags, Boolean addPriceFilterTags, Boolean addNewsFilterTags, Boolean addCategoryFilterTags) in D:\333\Projects\Cab\Src\Litium.Accelerator.Elasticsearch\Searching\ProductSearchServiceDecorator.cs:line 76
at Litium.Accelerator.Builders.Product.CategoryPageViewModelBuilder.BuildProducts(CategoryPageViewModel pageModel, Category category) in D:\333\Projects\Cab\Src\Litium.Accelerator\Builders\Product\CategoryPageViewModelBuilder.cs:line 99
at Litium.Accelerator.Builders.Product.CategoryPageViewModelBuilder.BuildAsync(Guid categorySystemId, DataFilterBase dataFilter) in D:\333\Projects\Cab\Src\Litium.Accelerator\Builders\Product\CategoryPageViewModelBuilder.cs:line 57

Request:

{“from”:0,“query”:{“bool”:{“filter”:[{“term”:{“channelSystemId”:{“value”:“7334ee08-60ee-4111-90e8-961a921cf21c”}}},{“term”:{“assortments”:{“value”:“b4b9184e-6423-4653-86a9-9f6de1366d1d”}}},{“term”:{“organizations”:{“value”:“00000000-0000-0000-0000-000000000000”}}},{“term”:{“categories”:{“value”:“73894088-7c9e-42e1-b629-f6a7693cbe6f”}}},{“bool”:{“should”:[{“term”:{“permissions”:{“value”:“Group:bb25d6e4-1014-4fd3-965a-d65f5a78d98e”}}},{“term”:{“permissions”:{“value”:“Group:12adaf68-2085-48f2-92fa-8826f106cea4”}}},{“term”:{“permissions”:{“value”:“Function/Websites/Content”}}},{“term”:{“permissions”:{“value”:“Function/Media/Content”}}},{“term”:{“permissions”:{“value”:“Function/Products/Content”}}}]}}]}},“size”:20,“sort”:[{“purchaseHistoryQuantity”:{“order”:“desc”}},{“name.keyword”:{“order”:“asc”}},{“articleNumber”:{“order”:“asc”}}],"_source":{“includes”:[“isBaseProduct”,“baseProductSystemId”,“variantSystemIds”]}}

Response:

{“error”:{“root_cause”:[{“type”:“illegal_argument_exception”,“reason”:“Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [articleNumber] in order to load field data by uninverting the inverted index. Note that this can use significant memory.”}],“type”:“search_phase_execution_exception”,“reason”:“all shards failed”,“phase”:“query”,“grouped”:true,“failed_shards”:[{“shard”:0,“index”:“document-dev-productdocument.sv-se”,“node”:“hMNMCZv5RvWKoiX4_EKG4Q”,“reason”:{“type”:“illegal_argument_exception”,“reason”:“Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [articleNumber] in order to load field data by uninverting the inverted index. Note that this can use significant memory.”}}],“caused_by”:{“type”:“illegal_argument_exception”,“reason”:“Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [articleNumber] in order to load field data by uninverting the inverted index. Note that this can use significant memory.”,“caused_by”:{“type”:“illegal_argument_exception”,“reason”:“Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [articleNumber] in order to load field data by uninverting the inverted index. Note that this can use significant memory.”}}},“status”:400}

Exception:

Elasticsearch.Net.ElasticsearchClientException: Maximum timeout reached while retrying request. Call: Status code 400 from: POST /document-dev-productdocument.sv-se/_search?typed_keys=true. ServerError: Type: search_phase_execution_exception Reason: “all shards failed” CausedBy: “Type: illegal_argument_exception Reason: “Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [articleNumber] in order to load field data by uninverting the inverted index. Note that this can use significant memory.” CausedBy: “Type: illegal_argument_exception Reason: “Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [articleNumber] in order to load field data by uninverting the inverted index. Note that this can use significant memory.”””

at Litium.Search.SearchExtensions.EnsureSuccessStatusCode[T](T response)
at Litium.Application.Search.SearchClientServiceImpl.SearchAsync[T](CultureInfo culture, Func2 descriptor) at Litium.Accelerator.Search.Searching.ProductSearchServiceDecorator.SearchAsync(SearchQuery searchQuery, IDictionary2 tags, Boolean addPriceFilterTags, Boolean addNewsFilterTags, Boolean addCategoryFilterTags) in D:\333\Projects\Cab\Src\Litium.Accelerator.Elasticsearch\Searching\ProductSearchServiceDecorator.cs:line 76

at Litium.Accelerator.Builders.Product.CategoryPageViewModelBuilder.BuildProducts(CategoryPageViewModel pageModel, Category category) in D:\333\Projects\Cab\Src\Litium.Accelerator\Builders\Product\CategoryPageViewModelBuilder.cs:line 99
at Litium.Accelerator.Builders.Product.CategoryPageViewModelBuilder.BuildAsync(Guid categorySystemId, DataFilterBase dataFilter) in D:\333\Projects\Cab\Src\Litium.Accelerator\Builders\Product\CategoryPageViewModelBuilder.cs:line 57

I think something is wrong with you model and the attributes used on it.

I am using the exact same code from accelerator, nothing is modified.

using System;
using System.Collections.Generic;
using Litium.Search;
using Nest;

namespace Litium.Accelerator.Search
{
    public class ProductDocument : IDocument
    {
        [Keyword(Ignore = true)]
        public string Id => string.Concat(ArticleNumber, ChannelSystemId).ToLowerInvariant();

        [Keyword]
        public string ArticleNumber { get; set; }

        public List<Guid> Assortments { get; set; } = new List<Guid>();

        public Guid BaseProductSystemId { get; set; }

        public List<Guid> Categories { get; set; } = new List<Guid>();

        public List<Guid> ParentCategories { get; set; } = new List<Guid>();

        [Nested]
        public List<SortItem> CategorySortIndex { get; set; } = new List<SortItem>();

        [ActiveOnChannel]
        public Guid ChannelSystemId { get; set; }

        public ISet<string> Content { get; set; }

        public bool IsBaseProduct { get; set; }

        [Nested]
        public List<MainCategory> MainCategories { get; set; }

        public decimal PurchaseHistoryQuantity { get; set; }

        public DateTime? NewsDate { get; set; }

        [Nested]
        public List<PriceItem> Prices { get; set; } = new List<PriceItem>();

        public List<Guid> ProductLists { get; set; } = new List<Guid>();

        [Nested]
        public List<SortItem> ProductListSortIndex { get; set; } = new List<SortItem>();

        [Nested]
        public List<TagItem> Tags { get; set; } = new List<TagItem>();

        public string Name { get; set; }

        public HashSet<Guid> VariantSystemIds { get; set; } = new HashSet<Guid>();

        [Permission]
        public IReadOnlyCollection<string> Permissions { get; set; }

        public ISet<Guid> Organizations { get; set; }

        public class SortItem
        {
            public Guid SystemId { get; set; }

            public int SortIndex { get; set; }
        }

        public class PriceItem
        {
            public Guid SystemId { get; set; }

            public Guid CountrySystemId { get; set; }

            public bool IsCampaignPrice { get; set; }

            public decimal Price { get; set; }
        }

        public class TagItem
        {
            [Keyword]
            public string Key { get; set; }

            [Keyword(EagerGlobalOrdinals = true)]
            public string Value { get; set; }
        }

        public class MainCategory
        {
            public Guid AssortmentSystemId { get; set; }

            [Keyword(EagerGlobalOrdinals = true)]
            public Guid CategorySystemId { get; set; }
        }
    }
}

Did you debug CategoryPageViewModelBuilder BuildProducts method?

Can you try updating the index prefix to another revision and rebuild? Sounds like it wasn’t configured correctly if articleNumber is indexed as Text data type.

so now i have renamed the prefix to “test-”
and all my index is gone.

Now I try to rebuild the productDocument

and I reach to my first error, I get same for other docments as well. This error goes away if I create the document manually in elastic, I have mentioned the same above.

2022-05-24 14:21:44.7327 [App:01] [] [ERROR] [.NET ThreadPool Worker] Litium.Search.IndexNamingService - 
Could not create index test-productdocument.sv-se. ServerError: 400
Type: illegal_argument_exception 
Reason: "failed to build synonyms" 
CausedBy: "Type: illegal_argument_exception Reason: "failed to get synonyms : 
http://ds2-dev38.333.local:9210/api/container/7cf104d9-43d3-48ae-b254-a219e86b6b64/5a487e27-aed4-473f-8c9f-dc477c4c3dbe/solr"
 CausedBy: "Type: null_pointer_exception Reason: """" 

and next error.

2022-05-24 14:21:44.7491 [App:01] [] [ERROR] [.NET ThreadPool Worker] Litium.Search.Indexing.IndexQueueService - 
Error in building index document for Litium.Accelerator.Search.ProductDocument 
with 7f30fa9e-14ec-45b2-9752-a0fd8ab1ee0c and "Index",
 {"id":"ProductDocument:7f30fa9e-14ec-45b2-9752-a0fd8ab1ee0c", "primaryTerm":1, "sequenceNumber":0, "version":1}: 
"Request failed to execute. Call: Status code 400 from: 
PUT /test-productdocument.sv-se. 
ServerError: Type: illegal_argument_exception Reason: "failed to build synonyms" 
CausedBy: "Type: illegal_argument_exception 
Reason: "failed to get synonyms : 
http://ds2-dev38.333.local:9210/api/container/7cf104d9-43d3-48ae-b254-a219e86b6b64/5a487e27-aed4-473f-8c9f-dc477c4c3dbe/solr" 
CausedBy: "Type: null_pointer_exception Reason: """"" Elasticsearch.Net.ElasticsearchClientException: Request failed to execute. 
Call: Status code 400 from: PUT /test-productdocument.sv-se. 
ServerError: Type: illegal_argument_exception Reason: "failed to build synonyms" 
CausedBy: "Type: illegal_argument_exception Reason: "failed to get synonyms : 
http://ds2-dev38.333.local:9210/api/container/7cf104d9-43d3-48ae-b254-a219e86b6b64/5a487e27-aed4-473f-8c9f-dc477c4c3dbe/solr" 
CausedBy: "Type: null_pointer_exception Reason: """"
   at Litium.Search.SearchExtensions.EnsureSuccessStatusCode[T](T response)
   at Litium.Application.Search.IndexNamingServiceImpl.ConfigurateIndex(String indexName, 
IIndexMappingConfiguration configuration, CultureInfo cultureInfo)
   at Litium.Application.Search.IndexNamingServiceImpl.<>c__DisplayClass9_1.
<GetCurrentIndexName>b__1()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
--- End of stack trace from previous location ---

   at System.Lazy`1.CreateValue()
   at Litium.Application.Search.IndexNamingServiceImpl.GetCurrentIndexName(String index, 
CultureInfo cultureInfo)
   at Litium.Common.RetryableLazy`1.get_Value()
   at Litium.Search.IndexNamingServiceExtensions.GetCurrentIndexName[T]
(IndexNamingService indexNamingService, CultureInfo cultureInfo)

   at Litium.Search.Indexing.MultilingualIndexDocumentBuilderBase`1.<Index>b__2_0(ValueTuple`2 x)
   at System.Linq.Enumerable.SelectEnumerableIterator`2.ToList()

   at Litium.Search.Indexing.IndexWriterQueueItem..ctor(IndexAction action, IndexQueueItem indexQueueItem, IEnumerable`1 items)
   at Litium.Search.Indexing.MultilingualIndexDocumentBuilderBase`1.Index(IndexQueueItem item)

   at Litium.Application.Search.IndexNamingServiceImpl.GetCurrentIndexName(String index, CultureInfo cultureInfo)
   at Litium.Search.IndexNamingServiceExtensions.GetCurrentIndexName[T](IndexNamingService 
indexNamingService, CultureInfo cultureInfo)
   at Litium.Search.Indexing.MultilingualIndexDocumentBuilderBase`1.<Index>b__2_0(ValueTuple`2 x)

   at System.Linq.Enumerable.SelectEnumerableIterator`2.ToList()
   at Litium.Search.Indexing.IndexWriterQueueItem..ctor(IndexAction action, IndexQueueItem 
indexQueueItem, IEnumerable`1 items)
   at Litium.Search.Indexing.MultilingualIndexDocumentBuilderBase`1.Index(IndexQueueItem item)

   at Litium.Application.Search.Indexing.IndexQueueServiceImpl.ProcessItem(IHit`1 doc, Action`1 
bulkDescriptor)
   at Litium.Application.Search.Indexing.IndexQueueServiceImpl.ProcessItem(IHit`1 doc, Action`1 
bulkDescriptor)
   at Litium.Application.Search.Indexing.IndexQueueServiceImpl.<>c__DisplayClass16_0.
<<ProcessQueue>b__0>d.MoveNext()
   at Litium.Application.Search.Indexing.IndexQueueServiceImpl.<>c__DisplayClass16_0.
<<ProcessQueue>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Litium.Application.Search.Indexing.IndexQueueServiceImpl.<>c__DisplayClass16_0.
<<ProcessQueue>b__0>d.MoveNext()

I think you lack ProductLanguageSystemId on your channel.
See this line on method BuildIndexedDocuments in ProductIndexDocumentBuilder.cs:

var channels = _channelService.GetAll().Where(x => x.ProductLanguageSystemId.HasValue && x.ProductLanguageSystemId.Value != Guid.Empty).ToList();

Please, try to execute the following command and come back with the result.

docker exec elasticsearch /bin/sh -c "ping ds2-dev38.333.local"

Note: If your elasticsearch container have another name, replace the elasticsearch with the name of the container.

this is the result that I get

I did a quick check and I can see I have set the ProductlanguageSystemId

image

1 Like

DNS is then working as it should.

Can you browse to the http://ds2-dev38.333.local:9210/api/container/7cf104d9-43d3-48ae-b254-a219e86b6b64/5a487e27-aed4-473f-8c9f-dc477c4c3dbe/solr ?

Yes I can, response is empty

Can you make the domain name point to the host-address of docker instead, if you have the default setup of docker it should return the ip 192.168.65.2 when you doing the ping. As it is described on Shared dependencies (litium.com) but with the 333.local domain name instead of localtest.me.

2 Likes

Modified appsettings.json based on ip configured in host file.

10.xx.xx.x host.docker.internal

"Elasticsearch": {
      "ConnectionString": "http://10.xx.xx.x:9200/",
      "Username": null,
      "Password": null,
      "Prefix": "test-",
      "Synonym": {
        "Server": "http://10.xx.xx.x:9210",
        "ApiKey": null
      }
    }

This solved the issue.
@patric.forsgard thanks for the help.

1 Like

And the reason it starts to work when you manually adding a document into the index is that the index is created if not exists when you creating the first document but you are in that case not passing any schema in for the document and then the search query will not work because of wrong property types in the auto-created schema.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.