Can someone explain to me when the analysis process takes place? I know that when we index a document it first goes to the translog and to an in-memory buffer (until here the document is not searchable, but we can retrieve it by its id). After that, the refresh process takes place and the in-memory segments are created (now the data is searchable, the in-memory buffer is cleared). Finally, the in-memory segments are merged and flushed to the disk (the translog is cleared).
So in which phase the analysis process is called? Is it before the refresh but after the translog and the in-memory buffer are created?