S
S
Stanislav Gordienko2013-08-27 15:56:55
Django
Stanislav Gordienko, 2013-08-27 15:56:55

Full text vs Q search in django

Greetings!

I recently started learning django, now I'm faced with the issue of searching the database. There is a job advertisement model, you need to organize a search by position name, skills (skills are indicated separated by commas), city and salary. Made an implementation using Q expressions. I especially didn't like the skill field part because I create a Q expression for each keyword. It turns out a very dirty implementation. In production, I assume that 20-30 ads per day will be possible, no more than 500-600 ads at the same time active for search. The question is, should I use sphinx and other libraries for full-text search, or leave the implementation as it is?

Thank you in advance for your response.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
barker, 2013-08-27
@barker

It's not very clear how you use Q for each word, do you just collect an expression from them with __icontains through filter along the chain? It and so on idea uses full-text search if the DB allows, emnip. What is the DB anyway?

S
Stanislav Gordienko, 2013-08-28
@stagor

Many thanks to everyone for the good advice. I decided that I would launch a site with the current implementation, and later, if necessary, I would start using third-party libraries for full-text search.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question