Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2007-06-22 08:03:52

The-Exit
Member
From: Berlin
Registered: 2005-07-16
Posts: 175
Website

Re: [request] better / advanced search

I have the impression, the search does not include the excerpt-field.

As I’m running a blog with now over 3.000 posts, I’d love to restrict the search, e.g. by category, author or date range.

But I assume, this means a lot of work. But I still keep hoping.

Offline

#14 2007-06-22 09:05:03

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: [request] better / advanced search

Your impression is correct. Search currently only includes body and title. Changing that isn’t all that much work, but might break compatibility with existing plugins. Context sensitive search (category/author) is not a bad idea, actually, and easier to add than a data restriction.

Offline

#15 2007-06-22 09:46:03

The-Exit
Member
From: Berlin
Registered: 2005-07-16
Posts: 175
Website

Re: [request] better / advanced search

Ruud, which kind of plugins could break, when including excerpt into the search?

Offline

#16 2007-06-22 10:16:30

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: [request] better / advanced search

Matthias, plugins that use MATCH in an SQL query using body/title columns (because that’s what the fullindex uses currently as columns), because the columns have to match exactly otherwise the query generates an error. I don’t know if any or how many plugins are affected and that’s what makes it tricky to change this in a stable release. It can be solved by adding a second index. This would make inserting articles a little bit slower, retrieving articles wouldn’t be affected, I think… but perhaps a MySQL expert can shed some light on that.

Another consideration is how much of an impact on search speed this would have as searching is done with RLIKE instead of MATCH and each extra column to search requires an extra RLIKE statement. Since excerpt is usually a lot smaller than body, I suspect that the impact is not that big, but it would have to be tested to make sure.

Last edited by ruud (2007-06-22 10:17:09)

Offline

#17 2007-09-18 15:24:38

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: [request] better / advanced search

I’ve released the ob1_advanced_search. Since I am not a SQL or MySQL expert I can’t tell you how this changes the load on your server since it relies on MATCH (with creating new indexes where needed) as the original TXP search. It will increase your database size that’s for sure with those indexes.


Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

Board footer

Powered by FluxBB