I want to use flask_whooshalchemyplus to manually index two tables named "Traduzioni" and "TraduzioniDlg" for full indexing. I created a simple endpoint on Flask, triggered by JQuery ajax request. The process stops apparentely without raising any exception. The tables contain text in English, Italian and Arabic, I think it could be related with the error. How can I manage different charsets with Whoosh?
## FILE views.py
from app import app
# ....
import whoosh
import flask_whooshalchemyplus
from flask_whooshalchemyplus import index_all
# .... A LOT OF STUFF HERE
@app.route("/createIndexes", methods=['GET'])
@login_required
def createIndexes():
d = ""
try:
index_all(app)
except e:
d = e
stjson = {'mimetype':'application/json', 'status_code':200, "rows":d}
return jsonify(resp=stjson)
1) No xhr status returned on Firefox console.
2) On server side (Pythonanywhere) 499 error is raised, here is the output:
93.41.1.147 - archeo [21/Jan/2020:15:22:49 +0000] "GET /createIndexes HTTP/1.1" 499 0 "https://fabioquintilii.pythonanywhere.com/admin" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0" "93.41.1.147" response-time=8.700
3) Server log stops after processing the first table: "2020-01-21 15:22:40 Indexing Traduzioni... "
4) In search.db/ folder the structure is as follows:
.
├── Traduzioni
│ ├── MAIN.tmp
│ │ ├── 3izw6phrod2o1ojvhs55ymaywukg.ctmp
│ │ ├── kkfrncvehj353od2zr7qdfz0ype7.ctmp
│ │ └── ogkmwxvb86vl3od6kwm533d3l658.ctmp
│ ├── MAIN_1kzdbfhp5z2389ms.pst
│ ├── MAIN_1kzdbfhp5z2389ms.trm
│ ├── MAIN_1kzdbfhp5z2389ms.vps
│ ├── MAIN_23qeml6mtoagefdb.pst
│ ├── MAIN_23qeml6mtoagefdb.trm
│ ├── MAIN_23qeml6mtoagefdb.vps
│ ├── MAIN_87ifp68y3amsfxmo.pst
│ ├── MAIN_87ifp68y3amsfxmo.trm
│ ├── MAIN_87ifp68y3amsfxmo.vps
│ ├── MAIN_WRITELOCK
│ └── _MAIN_0.toc
├── TraduzioniDlg
│ └── _MAIN_0.toc
└── tree.txt
3 directories, 16 files