WordPress.org

Ready to get started?Download WordPress

Forums

Relevanssi - A Better Search
Possible to index Category Archive titles + descriptions? (12 posts)

  1. a1wsn
    Member
    Posted 3 years ago #

    Hi,

    It would be useful if Relevanssi also indexes the Title and Description for each category, because the category archive may be the most relevant result for the search term. For example if somebody searches for 'animals' and there is a category with the title 'Animals' and the category description also includes animals then the main Category archive is probably more relevant than individual posts with that word. Right now the category archive doesn't appear in results at all. Would you please consider adding the ability to index the Category title and description?

    Thanks & Regards!

  2. Mikko Saari
    Member
    Plugin Author

    Posted 3 years ago #

    Category archives don't appear in the results, because they're not posts or pages. Relevanssi can't index anything that cannot be called using the get_post() function, which only fetches posts and pages.

    There is a way to get category archives indexed, but it is very complicated. It requires a custom post type and a method to get the category archive pages dumped to those posts so they can be indexed and so on... It's complex and I haven't ever done it myself.

    Actually, writing this gave me an idea how it could be done easier. Perhaps in a future version.

  3. a1wsn
    Member
    Posted 3 years ago #

    Thanks very much for the reply. Since my category archives would be the most relevant result for many searches, I really need to figure out a way to get them indexed. I saw on the Relevanssi's Facebook page about indexing author pages using custom post types, I guess I could do something similar... but I guess that would require creating a new post for each category and setting up redirects from each post to it's corresponding archive - and with over 100 categories on 4 blogs that would require a lot of setup and maintenance. Still, it's a possible solution.

    I do have one more question, you mentioned using custom post types - can you please explain why using a custom post type would be useful for this? Perhaps due to my lack of experience with custom post types, I can't see the advantage of using them in this situation...

    Thanks.

  4. Mikko Saari
    Member
    Plugin Author

    Posted 3 years ago #

    It has to be a custom post type because that way the posts can be hidden from users (only Relevanssi needs to see them). Hiding regular posts is harder. It's a possible solution, but it gets complex soon.

    Here's my idea on how this could be done: I could add a new function for Relevanssi, which you could then use on your search result page. The function would take the search query and return a list of matching categories based on category titles and descriptions.

    So, you could start the results with "Here's categories that match", then follow with the regular search result listing, or do it the other way around if that's better.

    How'd you like this one?

  5. a1wsn
    Member
    Posted 3 years ago #

    Yes that solution would work great, it's an excellent idea! Thanks for considering my suggestion :)

  6. mefjuu
    Member
    Posted 3 years ago #

    What about mentioned feature? Will it be possible to index custom taxonomies titles/names?
    It's higly awaiting feature, that I would be thankful for.

  7. Mikko Saari
    Member
    Plugin Author

    Posted 3 years ago #

    As I said, it's not possible, because they are not posts. Well, it's possible, and somebody did it, but it takes lots of hacking. I can do a custom mod to that effect, but it'll cost several hundred euros.

  8. Jerome
    Member
    Posted 2 years ago #

    Any luck in indexing wordpress' normal categories/descriptions yet?

    Sorry for the thread necro, no sense in duplicating a thread that already exists.

  9. a1wsn
    Member
    Posted 2 years ago #

    I don't think this plugin does it yet, but I've been using a 'Category Search' plugin which provides the category search results above the results provided by Relevanssi. It's good, although I think it only searches the category title, not category description.

    http://www.prelovac.com/vladimir/wordpress-plugins/category-search

    Relevanssi plus the above plugin work well together!

  10. Jerome
    Member
    Posted 2 years ago #

    Thats a broken link. Is it this plugin?

    http://wordpress.org/extend/plugins/category-search/

  11. a1wsn
    Member
    Posted 2 years ago #

    Yes it's the same plugin. But my link is not broken, it works when I click it! :)

  12. Mikko Saari
    Member
    Plugin Author

    Posted 2 years ago #

    Yes, Relevanssi does index and search for category archives, but only in the Premium version.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags