<p dir="ltr">Store each line as a DB record instead of the whole file as a record?</p>
<p dir="ltr">Or a background worker/queue that inserts files into the database and indexs them in the process?</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Sep 13, 2016 5:39 PM, "Alex Alex" <<a href="mailto:alex-alex-90@wp.pl">alex-alex-90@wp.pl</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Guys, thank you for all your input - I'm reviewing options you've suggested. As a quick fix it turn out that I have been able to make Whoosh working with this package: <a href="https://github.com/bkabrda/flask-whooshee" rel="noreferrer" target="_blank">https://github.com/bkabrda/<wbr>flask-whooshee</a>. What I really liked about previous approach was __searchable__ attribute. It was IMHO the most simple and clear method enabling full-text search for particular fields within ORM class.<br>
<br>
I'm not using sqlite3 only as dev server but actually the client app that works with server app uses it too in order to not to force users to install PostgreSQL. I had similar cases with MySQL - it was catching errors or choking on some request that were fine with sqlite and vice versa while in both cases using Python db api.<br>
<br>
I have one more question: I have to store text files inside database. The full-text search function is used to locate simple keywords in those text files. So far I'm just returning the list of files containing particular keyword (just as proof that current solution actually work). How would you implement providing info about particular line(s) containing the keyword. I need to return at least line number with keyword. I am thinking about loading files into memory and scanning them line by line<br>
but maybe there is a better approach. I'm sorry if this sounds like a stupid or trivial question but as I've written before I'm new to such assignment.<br>
Thanks in advance,<br>
Alex<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
Flask mailing list<br>
<a href="mailto:Flask@python.org">Flask@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/flask" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/flask</a><br>
</blockquote></div></div>