[prev in list] [next in list] [prev in thread] [next in thread] 

List:       trac
Subject:    [Trac] External PHP application to search full text in sqlite databases
From:       Mike <mike.e.charles () gmail ! com>
Date:       2012-07-24 16:23:57
Message-ID: a0c5c3dd-a006-4c51-ac8b-46630bad87d2 () googlegroups ! com
[Download RAW message or body]

I am planning to write a web application that allows users to search for a 
phrase within Wiki pages, ticket comments, project names, etc, basically 
reproducing the functionality in Redmine:

http://demo.redmine.org/search?q=first

I don't know Python, so it may be easier for me to do it in PHP. Assuming 
it's PHP, I did a small test using PHP-PDO, and looping over all projects I 
searched for a phrase in the Wiki pages using something like this:

SELECT name,version,author FROM (SELECT name, max(version) AS version, 
author, text FROM wiki GROUP BY name) WHERE text LIKE '%$searchTerm%'

It takes too long, so I need another solution, such as:

   1. Adding an index to the existing Trac databases - possible? does this 
   mess them up? Can Trac still use them?
   2. Doing hourly/daily dumps to MySQL with indexes on the MySQL database
   3. Not sure what else...

Are the Trac databases indexed, or set up to do this faster than I'm 
already doing it?

Thanks a lot!

-- 
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/whw4_iR29YgJ.
To post to this group, send email to trac-users@googlegroups.com.
To unsubscribe from this group, send email to trac-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.


[Attachment #3 (text/html)]

I am planning to write a web application that allows users to search for a phrase \
within Wiki pages, ticket comments, project names, etc, basically reproducing the \
functionality in Redmine:<br><br><div style="margin-left: \
40px;">http://demo.redmine.org/search?q=first<br></div><br>I don't know Python, so it \
may be easier for me to do it in PHP. Assuming it's PHP, I did a small test using \
PHP-PDO, and looping over all projects I searched for a phrase in the Wiki pages \
using something like this:<br><br><div style="margin-left: 40px;"><font face="courier \
new,monospace">SELECT name,version,author FROM (SELECT name, max(version) AS version, \
author, text FROM wiki GROUP BY name) WHERE text LIKE \
'%$searchTerm%'<br><br></font></div>It takes too long, so I need another solution, \
such as:<br><ol><li>Adding an index to the existing Trac databases - possible? does \
this mess them up? Can Trac still use them?</li><li>Doing hourly/daily dumps to MySQL \
with indexes on the MySQL database</li><li>Not sure what else...</li></ol><p>Are the \
Trac databases indexed, or set up to do this faster than I'm already doing \
it?</p><p>Thanks a lot!<br></p>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups "Trac \
Users" group.<br /> To view this discussion on the web visit <a \
href="https://groups.google.com/d/msg/trac-users/-/whw4_iR29YgJ">https://groups.google.com/d/msg/trac-users/-/whw4_iR29YgJ</a>.<br \
/>  To post to this group, send email to trac-users@googlegroups.com.<br />
To unsubscribe from this group, send email to \
trac-users+unsubscribe@googlegroups.com.<br />

For more options, visit this group at \
http://groups.google.com/group/trac-users?hl=en.<br />



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic