[2.10] catalog.lawnet_search_document #27

Closed
opened 2026-06-13 23:54:30 +02:00 by dernbu · 0 comments
Owner

Parent

#2 — depends on [2.8]

Schema

CREATE TABLE catalog.lawnet_search_document (
  id                 bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
  source_artifact_id bigint NOT NULL UNIQUE REFERENCES catalog.lawnet_artifact,
  plain_text         text   NOT NULL,
  search_vector      tsvector GENERATED ALWAYS AS (to_tsvector(english, plain_text)) STORED
);

Rules: source_artifact_id must reference a judgment_html artifact.

Done when

  • GIN index on search_vector
  • Generated tsvector column works correctly
## Parent #2 — depends on [2.8] ## Schema ```sql CREATE TABLE catalog.lawnet_search_document ( id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY, source_artifact_id bigint NOT NULL UNIQUE REFERENCES catalog.lawnet_artifact, plain_text text NOT NULL, search_vector tsvector GENERATED ALWAYS AS (to_tsvector(english, plain_text)) STORED ); ``` **Rules:** `source_artifact_id` must reference a `judgment_html` artifact. ## Done when - GIN index on `search_vector` - Generated `tsvector` column works correctly
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dernbu/lawnet-scraper#27
No description provided.