Open Edx Notes "No results found"

Im getting no result when searching inside my notes.

My log:

GET http://localhost:9200/notes/modelresult/_search?_source=true [status:200 request:0.006s]

Should i change “localhost” to my actual IP? If so…in which file should i do it?

Thanks in advance.

ps: i have a note created with “coment” as tag.

More info from the log:

[2020-07-30 22:22:02,313][DEBUG][action.admin.indices.mapping.put] [Cyclops] failed to put mappings on indices [[notes]], type [modelresult]
org.elasticsearch.index.mapper.MergeMappingException: Merge failed with failures {[mapper [user] has different index values, mapper [user] has different tokenize values, mapper [user] $
at org.elasticsearch.cluster.metadata.MetaDataMappingService$4.execute(MetaDataMappingService.java:511)
at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:365)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:188)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:158)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)

Could this be cause by this line added in cms.env.json?

ELASTIC_FIELD_MAPPINGS = {
“start_date”: {
“type”: “date”
}
}

Hi @Xperez,

Have you found the solution for the same as i have been facing the same issue?

Hi @Pratik_Ahir @Xperez

I’m currently investigating the issue.

I don’t know the root cause, but I fixed it by recreating the index for notes on several instances.
You can try to run the make command to rebuild the index:

# ssh to the instance and navigate to edx_notes_api service. You might need to activate the env too.
make create-index

It is the same as running the management command:
python manage.py search_index --rebuild -f

If you want to run it on devstack - you can use the command from the notes provisioning script:
docker compose exec -T ${name} bash -e -c 'cd /edx/app/notes/ && python manage.py search_index --rebuild -f'

I’ll post my investigation results later, if any.