Node with micronode property not being indexed
- Dominant language
- Java
- Stars
- 593
- Forks
- 123
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 4
Description
## Gentics Mesh Version, operating system, or hardware.
- v1.4.3
## Operating System
- Windows
## JVM
- Open JDK 1.8.0_100
## Problem
Micronodes properties doesn't show on elastic indices but they do on mesh ui. Therefore elastic queries are not working.
## Reproducer
Elastic mapping is set to STRICT
- MESH_ELASTICSEARCH_MAPPING_MODE=STRICT
POST http://localhost:8081/api/v2/microschemas/
{
"description":"author",
"name":"author",
"fields":[
{
"name":"name",
"type":"string",
"label":"name",
"required":false,
"elasticsearch":{
"type":"keyword"
}
}
],
"autoPurge":false,
"permissions":{
"create":true,
"read":true,
"update":true,
"delete":true
}
}
POST http://localhost:8081/api/v2/schemas/
{
"container":false,
"description":"books",
"name":"books",
"fields":[
{
"name":"name",
"type":"string",
"label":"name",
"required":false,
"elasticsearch":{
"type":"text"
}
},
{
"name":"authors",
"type":"list",
"label":"authors",
"required":false,
"listType":"micronode",
"allow":[
"author"
],
"elasticsearch":{
"type":"nested",
"properties": {
"name": {
"type": "keyword"
}
}
}
}
],
"permissions":{
"create":true,
"read":true,
"update":true,
"delete":true
},
"autoPurge":false,
"displayField":"name",
"segmentField":null,
"urlFields":[
]
}
Create a project, assign those to project.
create a node of book and add some authors.
Try to query elastic straight.
http://localhost:9200/_search?size=10000
Look for the book by using control + f and type the name of the book.
0 matches and if you go to mesh-ui, you will be able to see the book.
1. why elastic hasn't index the book node as it should?
2. why mesh can get the data even when is not stored in elastic?
## Expected behaviour and actual behaviour
Mesh should index the node when a schema has some micronode property.
Contributor guide
Research direction
Start by reproducing the issue with STRICT Elasticsearch mapping mode using the microschema, schema, project, and node API requests in the report. Trace how micronode properties are indexed and verify that the book and nested author data appear in Elasticsearch and can be queried, while remaining visible in the Mesh UI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch, java
- Domain
- backend, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100