Textpattern Forum

You are not logged in. Register | Login | Help

#1 2008-11-29 19:21:39

wet
Developer
From: Lenzing, Austria
Registered: 2005-06-06
Posts: 3,115
Website

wet_haystack: Custom fulltext search index builder

Textpattern’s full text index uses the articles’ body and title contents to find proper matches for site-internal searches.

wet_haystack is a plugin which allows site publishers to modify this default behaviour by adding additional article fields to the set of indexed content.

Documentation and download.

  • Requires Textpattern 4.2.0+
  • Does not play nicely with MLP

Offline

#2 2008-11-30 02:07:36

Els
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,390
Website

Re: wet_haystack: Custom fulltext search index builder

This. Is. Perfect. Thank you!!!


<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields

Offline

#3 2008-11-30 18:25:45

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 700

Re: wet_haystack: Custom fulltext search index builder

Hi Robert,

I’m getting some warning text in the pages that are coming from wet_haystack. It is there when I initially open the admin side and whenever I access the Fulltext Index tab.

Warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘where Index_type = ‘FULLTEXTAND Key_name = ‘wet_haystack’‘ at show INDEX from newtextpattern where Index_type = ‘FULLTEXTAND Key_name = ‘wet_haystack’ textpattern/lib/txplib_misc.php(570) : eval()’d code:139 getrows() in /Library/Apache2/htdocs/adev/textpattern/lib/txplib_db.php on line 82

Current Diagnostics:
Textpattern version: 4.0.7 (r3032)
Last Update: 2008-11-30 18:14:43/2008-11-29 07:15:33
Document root: /Library/Apache2/htdocs
$path_to_site: /Library/Apache2/htdocs/adev
Textpattern path: /Library/Apache2/htdocs/adev/textpattern
Permanent link mode: section_id_title
Temporary directory path: /private/var/tmp
Site URL: localhost/adev
PHP version: 4.3.2
GD Image Library: 2.0 or higher; supported formats: JPG, PNG.
Server Local Time: 2008-11-30 11:20:43
MySQL: 4.0.15
Locale: en_GB.UTF-8
Server: Apache/2.0.47 (Unix) DAV/2 PHP/4.3.2
Apache version: Apache/2.0.47 (Unix) DAV/2 PHP/4.3.2
PHP Server API: apache2handler
RFC 2616 headers:
Server OS: Darwin 8.11.0
Active plugins: ras_page_of-4.0.6.1, ras_if_article_keywords-4.0.6.1, smd_gallery-0.44, mod_authors_list-4.0.7.devm, ras_rollover_text-4.0.6m, ras_if_download_id-4.0.7.devm, ied_plugin_composer-0.74, upm_quick_write-dev-0.2, ras_if_dates-4.0.6.1, ras_plugin_credits-4.0.6.2, upm_image-0.6.1, bot_privs-0.1, wet_parachute-0.6, wet_haystack-0.3

Pre-flight check:
————————————
/Library/Apache2/htdocs/adev/textpattern/setup/ still exists
Some Textpattern files have been modified: /../index.php, /css.php, /include/txp_auth.php, /include/txp_category.php, /include/txp_diag.php, /include/txp_discuss.php, /include/txp_image.php, /include/txp_import.php, /include/txp_link.php, /include/txp_prefs.php, /include/txp_preview.php, /include/txp_section.php, /include/txp_tag.php, /lib/IXRClass.php, /lib/admin_config.php, /lib/class.thumb.php, /lib/classTextile.php, /lib/taglib.php, /lib/txplib_html.php, /lib/txplib_update.php, /lib/txplib_wrapper.php, /publish/log.php, /publish/search.php, /../rpc/index.php, /../rpc/TXP_RPCServer.php, /update/_to_4.0.5.php
————————————

.htaccess file contents:
————————————
#DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes

<IfModule mod_rewrite.c> RewriteEngine On #RewriteBase /relative/web/path/

RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*) index.php

RewriteCond %{HTTP:Authorization} !^$ RewriteRule .* – [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>

#php_value register_globals 0

————————————

Offline

#4 2008-11-30 19:03:41

wet
Developer
From: Lenzing, Austria
Registered: 2005-06-06
Posts: 3,115
Website

Re: wet_haystack: Custom fulltext search index builder

Rick, please try wet_haystack 0.4. This should work with both MySQL 4 and 5.

Offline

#5 2008-11-30 21:27:51

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 700

Re: wet_haystack: Custom fulltext search index builder

That clears the notices, thanks. I’ll post to this thread if I notice anything else. This makes some choices available that many have been asking for – very nice, Thanks.

Last edited by rsilletti (2008-11-30 21:32:04)

Offline

#6 2008-12-01 09:25:59

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 4,986
Website

Re: wet_haystack: Custom fulltext search index builder

this is wonderful!!! is there a way to search the image caption too?


Yiannis
——————————
neme.org | neme-imca.org | hblack.net | LABS

Offline

#7 2008-12-01 09:31:48

wet
Developer
From: Lenzing, Austria
Registered: 2005-06-06
Posts: 3,115
Website

Re: wet_haystack: Custom fulltext search index builder

No, this plugin just lifts capabilities which are inherent to Textpattern 4.0.7 onto a user interface. So as Textpattern itself cannot search anything besides article properties, this plugin won’t change this limitation.

Offline

#8 2008-12-01 10:54:08

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,979
Website

Re: wet_haystack: Custom fulltext search index builder

Great plugin wet. Very useful, thanks.

I think there’s one tiny edit you may need to make in the $columns array map: the index for section should have a capital ‘S’ or it doesn’t stay checked in the list after saving. Other than that, fab. I’m going to try and use that hidden pref in smd_fuzzy_find. Hurrah.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#9 2008-12-01 18:52:29

wet
Developer
From: Lenzing, Austria
Registered: 2005-06-06
Posts: 3,115
Website

Re: wet_haystack: Custom fulltext search index builder

Thanks, Stef. Fixed.

Offline

#10 2009-01-22 07:58:32

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

Re: wet_haystack: Custom fulltext search index builder

Getting a couple of errors:

Tag error:  <txp:article section="weblog" searchsticky="1"> ->  Textpattern Warning: Can't find FULLTEXT index matching the column list
select *, unix_timestamp(Posted) as uPosted, unix_timestamp(Expires) as uExpires, unix_timestamp(LastMod) as uLastMod, match (`Title`, `Body`, `Excerpt`) against ('portfolio') as score from l10n_txp_en_gb as l10n_txp_en_gb where 1=1 and Status >= 4 and Posted <= now() and (now() <= Expires or Expires = 0) and (`Title` rlike 'portfolio' or `Body` rlike 'portfolio' or `Excerpt` rlike 'portfolio') and Section != 'portfolio' and Section != 'contact' and Section != 'search' order by score desc limit 0, 10  on line 110

And the search results don’t actually show up… Just the errors at the top.

Not sure, but I think it might have something to do with the MLP? Any ideas

Offline

Board footer

Powered by FluxBB