refs fititnt/uwazi-docker/issues/2
Actual documentation does not suggest run yarn reindex or node run.js ./database/reindex_elastic.js after intialization with yarn blank-state.
{ error:
[ '[index_not_found_exception] no such index, with { resource.type="index_or_alias" & resource.id="uwazi_development" & index_uuid="_na_" & index="uwazi_development" } :: {"path":"/uwazi_development/_search","query":{},"body":"{\\"_source\\":{\\"include\\":[\\"title\\",\\"icon\\",\\"processed\\",\\"creationDate\\",\\"template\\",\\"metadata\\",\\"type\\",\\"sharedId\\",\\"toc\\",\\"attachments\\",\\"language\\",\\"file\\",\\"uploaded\\",\\"published\\",\\"relationships\\"]},\\"from\\":0,\\"size\\":30,\\"query\\":{\\"bool\\":{\\"must\\":[{\\"bool\\":{\\"should\\":[]}}],\\"must_not\\":[],\\"filter\\":[{\\"term\\":{\\"published\\":true}},{\\"term\\":{\\"language\\":\\"en\\"}}]}},\\"sort\\":[{\\"creationDate.sort\\":{\\"order\\":\\"desc\\",\\"unmapped_type\\":\\"boolean\\"}}],\\"aggregations\\":{\\"all\\":{\\"global\\":{},\\"aggregations\\":{\\"types\\":{\\"terms\\":{\\"field\\":\\"template.raw\\",\\"missing\\":\\"missing\\",\\"size\\":9999},\\"aggregations\\":{\\"filtered\\":{\\"filter\\":{\\"bool\\":{\\"must\\":[{\\"bool\\":{\\"should\\":[]}},{\\"term\\":{\\"language\\":\\"en\\"}}],\\"filter\\":[{\\"match\\":{\\"published\\":true}}]}}}}}}}}}","statusCode":404,"response":"{\\"error\\":{\\"root_cause\\":[{\\"type\\":\\"index_not_found_exception\\",\\"reason\\":\\"no such index\\",\\"resource.type\\":\\"index_or_alias\\",\\"resource.id\\":\\"uwazi_development\\",\\"index_uuid\\":\\"_na_\\",\\"index\\":\\"uwazi_development\\"}],\\"type\\":\\"index_not_found_exception\\",\\"reason\\":\\"no such index\\",\\"resource.type\\":\\"index_or_alias\\",\\"resource.id\\":\\"uwazi_development\\",\\"index_uuid\\":\\"_na_\\",\\"index\\":\\"uwazi_development\\"},\\"status\\":404}"}',
' at respond (/alligo/code/fititnt/uwazi-docker/uwazi/node_modules/elasticsearch/src/lib/transport.js:295:15)',
' at checkRespForFailure (/alligo/code/fititnt/uwazi-docker/uwazi/node_modules/elasticsearch/src/lib/transport.js:254:7)',
' at HttpConnector.<anonymous> (/alligo/code/fititnt/uwazi-docker/uwazi/node_modules/elasticsearch/src/lib/connectors/http.js:159:7)',
' at IncomingMessage.bound (/alligo/code/fititnt/uwazi-docker/uwazi/node_modules/elasticsearch/node_modules/lodash/dist/lodash.js:729:21)',
' at emitNone (events.js:91:20)',
' at IncomingMessage.emit (events.js:185:7)',
' at endReadableNT (_stream_readable.js:974:12)',
' at _combinedTickCallback (internal/process/next_tick.js:80:11)',
' at process._tickCallback (internal/process/next_tick.js:104:9)' ] },
status: 500 }
at /alligo/code/fititnt/uwazi-docker/uwazi/app/react/ServerRouter.js:184:15
at process._tickCallback (internal/process/next_tick.js:109:7)
This error disappears when yarn reindex is executed after the yarn blank-state.
This issues need confirmation if is valid.
If is maybe would be a good idea 1) or document this, 2) or editing one command (like yarn blank-state to include the action of yarn reindex) or 3) create a new task
@fititnt yes the issue exists, thanks for reporting, i think it makes sense to include the reindex part on the blank state.
Good. Should I test & do the PR with this one? Or we wait for more feedback?
Ok, Yes, do a PR with this one.
I will work on the #1595 a bit then go back here. If for some reason near uwazi v1.2 release I forgot to PR this one, anyone can just commit