XF 2.4 Custom Field Improvements: Searching!

A short while ago we let you know about some improvements coming to XenForo 2.4 related to custom fields. You can catch up here:


Today we're continuing on that topic with the next logical progression: Custom field searching!

When adding a custom field you can now, under "General options", toggle whether the field can be included in the search index. This appears just below the new option to enable filtering.

Let's say we have a thread for bug reports with a custom field where you can specify a bug category:

1772135800627.webp


You can search in a couple of ways.

First, and probably most simple for text-based values, would be just searching for "control panel" (or any reasonable combination) in the quick search box.

1772136314392.webp


For a more advanced search, where you may want to search for multiple values across multiple fields, you can go to the Search forums page:

1772136602416.webp


We're excited to hear what you think and what your use cases will be for custom field searching (and filtering). We have a few more ideas for custom field improvements planned for the future so please let us know what else you'd like to see.
 
Just to clarify--these are custom thread fields?

Funny, we were just discussing this in another thread.

Having the ability to use custom thread fields to populate a "search forum" is exactly what we need.
 
We're excited to hear what you think and what your use cases will be for custom field searching (and filtering). We have a few more ideas for custom field improvements planned for the future so please let us know what else you'd like to see.
Oh my this is great. I use custom fields EXTENSIVELY in @Bob addons such as Showcase and RMS. Like 50+ fields and tons of choice fields so this is HUGE. :) I'll DM you my site to see.

What else I'd like to see? Hmm...
  • Upload/attach to a custom field
  • Repeater Field or a Table-style Input for custom fields would be neat. Sort of like how choice fields are added on the back end... enter one line and another line appears
  • Prompts for text based custom fields
  • Conditional required custom fields... fields that become required if another custom field has information entered or the thread/item has a certain prefix.
  • Custom fields that are only visible to a certain user group or are blurred if you are not a certain user group.
 
Last edited:
Having the ability to use custom thread fields to populate a "search forum" is exactly what we need.
Yes custom thread fields. I think you can already do this. Search forums are a little bit misleading in naming because they don't actually use the actual search index. They use the "searcher" system in the back end (think like the search users page or the criteria you get when using batch update threads/users). We've always supported custom field searching there.

1772137714771.webp


This is from the search forums UI here (still running 2.3).
 
Very nice and extremely welcome!

Will this allow filtering on multiple fields? And if so will it be possible to deny crawler bots (Google) to crawl endless combinations of fields?
I ask because URL's with a combination of fields often lead to Google's crawl budget being spent on endless variations of search query string parameters. Google really tanks site rankings on that.

For the sake of usability and for SEO, I'm hoping that live AJAX/JS filtering will be in another HYS.
 
Yes custom thread fields. I think you can already do this. Search forums are a little bit misleading in naming because they don't actually use the actual search index. They use the "searcher" system in the back end (think like the search users page or the criteria you get when using batch update threads/users). We've always supported custom field searching there.



This is from the search forums UI here (still running 2.3).
Will this be available in the Resource Manager addon to?

Searchable custom fields?
 
Will this allow filtering on multiple fields?
Yep.
And if so will it be possible to deny crawler bots (Google) to crawl endless combinations of fields?
I ask because URL's with a combination of fields often lead to Google's crawl budget being spent on endless variations of search query string parameters. Google really tanks site rankings on that.
This is something we're looking in to.
 
Yes custom thread fields. I think you can already do this. Search forums are a little bit misleading in naming because they don't actually use the actual search index. They use the "searcher" system in the back end (think like the search users page or the criteria you get when using batch update threads/users). We've always supported custom field searching there.
I do see it now. Where I use Search Forums currently, we don't have any custom thread fields, so that's why I was missing it. Looking at our development forum...sure enough, the "add search forum" has all of them at the bottom.

What I meant to ask (now that I'm fully awake) is that when creating search forums, I wish we had a way to sort by using one of the custom fields, either ascending or descending. I could create any number of custom fields to hold the number, and have my choice of which field to use in any specific search forum to control the sorting. I wouldn't want that sorting field to display, but I know a way around it.

What I am aiming to do is bundle up hundreds of existing threads and put them in a specific order. The threads were created in different years (or decades--content goes back to 2002), not always posted chronologically, and even if we use a prefix in front of the thread title, that would throw off sorting for other search forums we want to create.
 
Is that a thing?
Yes, you can also encounter it with multiprefix or other things that can be combined. It wastes crawl budget so your important pages may not get indexed. It can reduce pagerank, as different versions of the same page can compete and therefore reducing the value/ranking of the page. All in all there are many compiling factors; it creates a big mess that Google really dislikes.

There are various ways to address this. The best approach is to have JS/AJAX filters as Google will completely ignore it. And users like it a lot too.
An additional solution is to give each custom field a index/noindex setting, so that such pages will be not be indexed. And of course exclude it from sitemaps.
Canonical tags can and should be used, but Google will often choose a different canonical than the setting and mark it as duplicate page, Canonical is useful but doesn't prevent the massive mess.
Its also useful to make sure that robots.txt, sitemap and index/noindex meta tags match up. i.e. Automatically add noindex parameter strings to robots.txt Related suggestion here.
 
@Chris D ...
What I meant to ask (now that I'm fully awake) is that when creating search forums, I wish we had a way to sort by using one of the custom fields, either ascending or descending. I could create any number of custom fields to hold the number, and have my choice of which field to use in any specific search forum to control the sorting.
Thinking on this a bit...here is one way I was thinking custom thread fields could be sortable.

When creating a custom field, we would have a new checkbox option:

1772237384135.webp


This would make the custom field show up in "Sort order" when creating a search forum...or anywhere else we could sort on custom fields. Example:

1772237556567.webp


An optional checkbox (when adding a custom thread field) could determine whether the custom field is viewable or not. So in cases where we want a custom sort order, we could use the field for sorting, but would not necessarily have to display it anywhere in the thread.
 
Back
Top Bottom