I am building a website that will allow users to search for specific words/phrases inside large documents. I'm using PostgreSQL and each document stores a title and the document's actual content (there will be less than 10,000 documents each under 1MB of text). I want to use full text or fuzzy searching but the only solutions I've found so far allow for matching only one or two words.
Documents table:
CREATE TABLE documents (
id serial,
title text,
content text
);
Example:
For example purposes, I'll add a few rows to the table.
INSERT INTO documents (title, content)
VALUES ('The Brown Fox', 'The quick brown fox jumps over the lazy dog')
INSERT INTO documents (title, content)
VALUES ('Boxing Wizards', 'The five boxing wizards jump quickly.')
INSERT INTO documents (title, content)
VALUES ('Crazy Fredrick', 'Crazy Fredrick bought many very exquisite opal jewels.')
I want to be able to full text or fuzzy search through both the title and content fields with words (ie. searching the quixk bronw fox would still return row 1 ['The Brown Fox'])