Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jeroen Oostwouder 100 posts 296 karma points
    Jun 03, 2019 @ 11:08
    Jeroen Oostwouder
    0

    Umbraco Tree-search on custom fields

    Is there a way to search in the content-tree for values in custom fields?

    for instance: I have a nodetype containing a property "fldName".

    How can I search (using the searchbar above the content-tree) for values in "fldName"? I've checked the internal search indexer (and searcher) and I've added the IndexUserFields to the InternalIndexSet.

    It works when searching in the searcher on the Examine Developers tab. But I want to be able to search for that field in the content-search.

    Or is this simply impossible?

  • Marc Goodson 2141 posts 14344 karma points MVP 8x c-trib
    Jun 11, 2019 @ 19:16
    Marc Goodson
    100

    Hi Jeroen

    Yes you can replace, or update the search logic, for the backoffice search for a particular tree, eg here 'content', by implementing the interface ISearchableTree, introducing your custom searching logic, and then at Umbraco startup time, register your implementation of ISearchableTree as the one for Umbraco to use.

    Have a look at the documentation here:

    v7: https://our.umbraco.com/Documentation/Extending/Section-Trees/Searchable-Trees/index-v7

    v8: https://our.umbraco.com/Documentation/Extending/Section-Trees/Searchable-Trees/

    It should have all the steps you need to follow to implement your own backoffice search for content!

    regards

    Marc

  • Jeroen Oostwouder 100 posts 296 karma points
    Jun 12, 2019 @ 06:25
    Jeroen Oostwouder
    0

    Thanks,

    that is exactly what I needed.

Please Sign in or register to post replies

Write your reply to:

Draft