Link to home
Start Free TrialLog in
Avatar of Camillia
CamilliaFlag for United States of America

asked on

How do you think this website does searches?

I'm working on a project that I need to search a text field. For example, we have text of PDF files in the database. User types "united states" and we need to bring back all the rows with that word.

This website's search is very fast https://www.courtlistener.com/

Type a letter "M". It brings back 1.5 million rows in 1138 ms

How do you think they do this? (I was thinking about using SQL Server Full Text search. I also thought about having "keywords")

I have SQL Server 2016 developer edition, VS 2015 community edition.
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
And a 'search' like that can be done simply with 'LIKE' statements in the WHERE clause.
SELECT * FROM masterlist WHERE field1 LIKE '%M%' OR field2 LIKE '%M%' OR field3 LIKE '%M%'

Open in new window

Avatar of Camillia

ASKER

Thanks, Dave. Let me think about this " the complete text would be in a separate file that is loaded only when it is requested."...

If the complete text is in another file...how can it be searchable? I think I need to make ..for example "title" searchable and keep that in the database column. So make only certain sections of the document searchable and only keep those sections in the database and the entire text in a separate file on the server?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks . I'm still thinking about Dave's suggestion...to keep the files separately. I wonder how that's done if we want to make the text searchable. I think we need to define keywords for each document and search the keywords and from there ...find the related docs.

I've never worked with NoSQL. This is a C# ASP.Net VS 2015 with SQL 2014 for now but I can use another DB. I'll research more.