Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Trac: Users

External PHP application to search full text in sqlite databases

 

 

Trac users RSS feed   Index | Next | Previous | View Threaded


mike.e.charles at gmail

Jul 24, 2012, 9:23 AM

Post #1 of 3 (434 views)
Permalink
External PHP application to search full text in sqlite databases

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 [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.


ryano at physiosonics

Jul 24, 2012, 12:17 PM

Post #2 of 3 (409 views)
Permalink
Re: External PHP application to search full text in sqlite databases [In reply to]

When working from another language or an external application, my first
approach would be to use the XmlRpcPlugin (1), since the query may already
be optimal.

search.performSearch(string query, array filters=None)

--
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/-/4xPUIY8NlB0J.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.


ryano at physiosonics

Jul 24, 2012, 12:17 PM

Post #3 of 3 (412 views)
Permalink
Re: External PHP application to search full text in sqlite databases [In reply to]

When working from another language or an external application, my first
approach would be to use the XmlRpcPlugin (1), since the query may already
be optimal.

search.performSearch(string query, array filters=None)

(1) http://trac-hacks.org/wiki/XmlRpcPlugin

--
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/-/vTeKLsX435EJ.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.

Trac users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.