[ "$_DATE" ] || _DATE="$(date +%s)"
+debug "$REQUEST_METHOD $REQUEST_URI $SERVER_PROTOCOL"
+
ingest() {
local J="$1"
results="@ $(
search "${_DATA}/${_INDEX}" $words \
| while read -r score id source; do
- S="$(DB2 "" set _id str:"$(UNSTRING "${id#/}")")"
+ S="$(DB2 "" set _index str:"${_INDEX}")"
+ S="$(DB2 "$S" set _id str:"$(UNSTRING "${id#/}")")"
S="$(DB2 "$S" set _score num:"$score")"
S="$(DB2 "$S" set _source obj:"$(UNSTRING "$source")")"
printf 'obj:%s\t' "$(STRING "$S")"