K
K
Konstantin Malyarov2018-03-30 23:01:24
Django
Konstantin Malyarov, 2018-03-30 23:01:24

Whole database search in Django?

There is a database with a table - patients, operations, case histories.
How to make the search go through all tables (patients, operations, case histories)?
For example:
search for "Ivanov"
1. Patient Ivanova Maria Ivanovna, born in 1971.
2. Case history No. 597 Ivanova diagnosis of ARVI
search for "ARVI"
1. Case history No. 597 Ivanova diagnosis of ARVI
2. Case history No. 162 Petrov diagnosis of ARVI

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimonchik, 2018-03-31
@Konstantin18ko

in an adult
way machakux.appspot.com/blog/91008/full_text_search_i...
haystacksearch.org
but if the Postgre backend, FullText is not bad there (probably in the muscle too already)
https://www.calazan.com/how-to- add-full-text-search...

A
Avrong, 2018-03-30
@Avrong

For the first example, there is a One-to-Many relationship, and for the second, there is a regular query into a table with case histories.
In general, perhaps the only option for me is to search in the necessary tables and display a structured result by sections.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question