Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2023-07-26 19:43:33

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 619
Website

search including certain custom fields

Hi, I’m building a search page and it has been a while since I have used the core search tags and functionality.
I would like to know how can I configure the search to look into certain fields and custom fields or should I use a plugin for that as “smd_query” please?
And I would like to know on which fields does the core search is looking into by default please?

Offline

#2 2023-07-26 21:55:07

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,293
Website GitHub

Re: search including certain custom fields

By default, core searches Title, Body + Excerpt. You can use wet_haystack to extend this but I’ve no idea if it still works. The plugin doesn’t seem to be available any more from Robert’s site, nor his Github page.

Here’s the only version I have (v0.6), but I don’t know if it’s the most recent:

# wet_haystack v0.6
# Custom full text index builder
# Robert Wetzlmayr
# http://awasteofwords.com/software/wet_haystack-textpattern-plugin

# ......................................................................
# This is a plugin for Textpattern - http://textpattern.com/
# To install: textpattern > admin > plugins
# Paste the following text into the 'Install plugin' box:
# ......................................................................

YToxMTp7czo3OiJ2ZXJzaW9uIjtzOjM6IjAuNiI7czo2OiJhdXRob3IiO3M6MTY6IlJvYmVy
dCBXZXR6bG1heXIiO3M6MTA6ImF1dGhvcl91cmkiO3M6NjU6Imh0dHA6Ly9hd2FzdGVvZndv
cmRzLmNvbS9zb2Z0d2FyZS93ZXRfaGF5c3RhY2stdGV4dHBhdHRlcm4tcGx1Z2luIjtzOjEx
OiJkZXNjcmlwdGlvbiI7czozMDoiQ3VzdG9tIGZ1bGwgdGV4dCBpbmRleCBidWlsZGVyIjtz
OjQ6InR5cGUiO2k6MztzOjU6ImZsYWdzIjtpOjE7czo0OiJuYW1lIjtzOjEyOiJ3ZXRfaGF5
c3RhY2siO3M6NDoiaGVscCI7czo0OTk2OiIKCTxoMz5QdXJwb3NlPC9oMz4KCgk8cD5UZXh0
cGF0dGVybiYjODIxNztzIGZ1bGwgdGV4dCBpbmRleCB1c2VzIHRoZSBhcnRpY2xlcyYjODI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hdGNoZXMgVGV4dHBhdHRlcm4ncyBkZWZhdWx0IHNldHRpbmcgKGkuZS4gIlRpdGxl
IiBhbmQgIkJvZHkiIGFyZSB0aGUgc29sZWx5IGNoZWNrZWQgcHJvcGVydGllcykuCgpoMy4g
QWRkaXRpb25hbCBpbmZvcm1hdGlvbgoKVmlzaXQgdGhlICJ3ZXRfaGF5c3RhY2sgZG9jdW1l
bnRhdGlvbiBwYWdlIjpodHRwOi8vYXdhc3Rlb2Z3b3Jkcy5jb20vc29mdHdhcmUvd2V0X2hh
eXN0YWNrLXRleHRwYXR0ZXJuLXBsdWdpbi4KCmgzLiBMaWNlbmNlCgpUaGlzIHBsdWdpbiBp
cyByZWxlYXNlZCB1bmRlciB0aGUgIkdudSBHZW5lcmFsIFB1YmxpYyBMaWNlbmNlIjpodHRw
Oi8vd3d3LmdudS5vcmcvbGljZW5zZXMvZ3BsLnR4dC4KIjtzOjM6Im1kNSI7czozMjoiZmNi
OWQxZGRjMjQ1Zjk0Yzc4OTMyY2I5MjIwYWI4OGQiO30=

The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2023-07-27 19:45:33

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 619
Website

Re: search including certain custom fields

Thank you very much 🙏, I will check Wet’s plugin or will end up using yours or so 👍

Offline

#4 2023-07-28 06:02:16

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 308
Website GitHub GitLab Twitter

Re: search including certain custom fields

Do not miss also the awesome etc_search plug-in.

Offline

Board footer

Powered by FluxBB