feat(search): gator fields in oo_docs_text + field filters (Option D) #86

Open
opened 2026-10-07 09:20:24 +01:00 by Yftyr · 0 comments
Collaborator

Option D: field-based search over OCR/gator data (rechnungsnummer, lieferant, betrag, status, …), following the existing "own index" decision (do not modify the server files_file index).\n\nIncrement 1 (this PR, library)\n- TextDoc carries gator keyword fields: doc_sha, number, seller, total, typ, issued_at, created_at, status, url (content now omitempty so partial docs are possible).\n- oo_docs_text mapping extended with the keyword fields.\n- ESTextIndex.UpsertFields: bulk update + doc_as_upsert, so a gator-only doc merges into the existing text doc without clobbering title/content.\n- SearchQuery gains Seller/Number/Status term filters; results expose Fields (gator values) on SearchHit.\n- Pure builders unit-tested.\n\nFollow-ups\n- gator→oo_docs_text sync tool (pull /api/v1/invoices, call UpsertFields by oo_file_id).\n- oo search --seller/--number/--status CLI flags.\n- OnlyOffice Documents plugin panel "Beleg-Suche" (deep-link DocEditor.aspx?fileid=).\n\nOption C (gator fields as WebDAV properties) already shipped in oo-webdav v0.3.0.

Option D: field-based search over OCR/gator data (rechnungsnummer, lieferant, betrag, status, …), following the existing "own index" decision (do not modify the server files_file index).\n\n**Increment 1 (this PR, library)**\n- TextDoc carries gator keyword fields: doc_sha, number, seller, total, typ, issued_at, created_at, status, url (content now omitempty so partial docs are possible).\n- oo_docs_text mapping extended with the keyword fields.\n- ESTextIndex.UpsertFields: bulk update + doc_as_upsert, so a gator-only doc merges into the existing text doc without clobbering title/content.\n- SearchQuery gains Seller/Number/Status term filters; results expose Fields (gator values) on SearchHit.\n- Pure builders unit-tested.\n\n**Follow-ups**\n- gator→oo_docs_text sync tool (pull /api/v1/invoices, call UpsertFields by oo_file_id).\n- `oo search --seller/--number/--status` CLI flags.\n- OnlyOffice Documents plugin panel "Beleg-Suche" (deep-link DocEditor.aspx?fileid=).\n\nOption C (gator fields as WebDAV properties) already shipped in oo-webdav v0.3.0.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: eSlider/go-onlyoffice#86