The full text search by ElasticSearch can not work, it always get a 500 error in the admin UI.
And a http status 400 error in the log:
{
"logLevel": "Error",
"message": "An unexpected exception has occurred.",
"app": {
"name": "Squidex",
"version": "1.0.0.0",
"sessionId": "3f8d7146-53ec-4153-ac82-8f605fbd73db"
},
"web": {
"requestId": "|98c412cf-4bfb8a86c1dc6603.",
"requestPath": "/content/db/artist",
"requestMethod": "GET",
"routeValues": {
"area": "Api",
"action": "GetContents",
"controller": "Contents"
}
},
"timestamp": "2020-10-15T18:19:50Z",
"exception": {
"type": "Elasticsearch.Net.ElasticsearchClientException",
"message": "Request failed to execute. Call: Status code 400 from: POST /squidex/_search. ServerError: Type: x_content_parse_exception Reason: \u0022[1:54] [bool] failed to parse field [must]\u0022 CausedBy: \u0022Type: illegal_argument_exception Reason: \u0022value cannot be null\u0022\u0022",
"stackTrace": " at Squidex.Domain.Apps.Entities.Contents.Text.Elastic.ElasticSearchTextIndex.SearchAsync(String queryText, IAppEntity app, SearchFilter filter, SearchScope scope) in /Users/jonas/Desktop/projects/pacc/squidex/backend/src/Squidex.Domain.Apps.Entities/Contents/Text/Elastic/ElasticSearchTextIndex.cs:line 194\n at Squidex.Domain.Apps.Entities.MongoDb.Contents.Operations.QueryContentsByQuery.DoAsync(IAppEntity app, ISchemaEntity schema, ClrQuery query, SearchScope scope) in /Users/jonas/Desktop/projects/pacc/squidex/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryContentsByQuery.cs:line 86\n at Squidex.Domain.Apps.Entities.MongoDb.Contents.MongoContentCollectionAll.QueryAsync(IAppEntity app, ISchemaEntity schema, ClrQuery query) in /Users/jonas/Desktop/projects/pacc/squidex/backend/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentCollectionAll.cs:line 71\n at Squidex.Domain.Apps.Entities.Contents.Queries.ContentQueryService.QueryByQueryAsync(Context context, ISchemaEntity schema, Q query) in /Users/jonas/Desktop/projects/pacc/squidex/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentQueryService.cs:line 216\n at Squidex.Domain.Apps.Entities.Contents.Queries.ContentQueryService.QueryAsync(Context context, String schemaIdOrName, Q query) in /Users/jonas/Desktop/projects/pacc/squidex/backend/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentQueryService.cs:line 102\n at Squidex.Areas.Api.Controllers.Contents.ContentsController.GetContents(String app, String name, String ids, String q) in /Users/jonas/Desktop/projects/pacc/squidex/backend/src/Squidex/Areas/Api/Controllers/Contents/ContentsController.cs:line 218\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeActionMethodAsync\u003Eg__Awaited|12_0(ControllerActionInvoker invoker, ValueTask\u00601 actionResultValueTask)\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeNextActionFilterAsync\u003Eg__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State\u0026 next, Scope\u0026 scope, Object\u0026 state, Boolean\u0026 isCompleted)\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\u003CInvokeInnerFilterAsync\u003Eg__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeNextExceptionFilterAsync\u003Eg__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)"
}
}
I checked the ElasticSearch indices, It creates indices when create an item, update and delete won’t update.
The index in ElasticSearch looks like below:
the appId, contentId, schemaId are empty, i think that’s why we get the 400 error from:
{
"_index": "paccdb",
"_type": "_doc",
"_id": "6d9826e9-9342-4f16-baf7-007d36a48112--c4e15469-b392-4cfd-9f25-db43f1691fc5_1",
"_version": 1,
"_seq_no": 1,
"_primary_term": 1,
"found": true,
"_source": {
"appId": {},
"appName": "db",
"contentId": {},
"schemaId": {},
"schemaName": "artist",
"serveAll": true,
"servePublished": true,
"texts": {
"iv": "彭俊发 男 1964-07-01T00:00:00Z 汉 上海市 上海市 奉贤区 66b937f8-7317-4c3f-9b29-9a44b2bde3eb 传统木作技艺 区(市)级传承人 测试 eae4a32a-c151-4af4-aedd-e18d897cf3fa bb6feb41-f974-457b-b277-1ec07dd4cea0 da0f3db6-29fa-4340-ab0b-15593281bb7f 1183e25b-d103-4a4e-a107-eec8d32b9e76 863a32ce-591c-4513-8504-243b9907326b b53fbab4-f0a2-4a60-ad2c-d53e9f46a779 da89a893-1ff3-420d-accc-1c7dfebb142d e5528e3a-2ee6-4576-ac5c-07160b9e55e8 97897ee9-8ae0-40fe-a6e8-fcae1c0c379c 2f0c4e23-fbca-4e77-9fd3-0090a864ac86 03084a09-6544-4502-9c2a-2a1941b8b17e a087c37c-49c5-498d-95c2-534c5a0d7216"
}
}
}
By the way, can we resolve the reference id to related data, the content id in the texts is meaningless.
- [ x] Checked the logs and have uploaded a log file and provided a link because I found something suspicious there. Please do not post the log file in the topic because very often something important is missing.
I’m submitting a…
- [ ] Regression (a behavior that stopped working in a new release)
- [ x] Bug report
- [ ] Performance issue
- [ x] Documentation issue or request
Current behavior
Expected behavior
Minimal reproduction of the problem
Environment
- [ ] Self hosted with docker
- [ ] Self hosted with IIS
- [ x] Self hosted with other version
- [ ] Cloud version
Version: [VERSION]
Browser:
- [ x] Chrome (desktop)
- [ ] Chrome (Android)
- [ ] Chrome (iOS)
- [ ] Firefox
- [ ] Safari (desktop)
- [ ] Safari (iOS)
- [ ] IE
- [ ] Edge
Others: