Copied to clipboard

Flag this post as spam?

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


  • Lachlann 325 posts 547 karma points
    Dec 02, 2014 @ 11:00
    Lachlann
    0

    Umbraco 7.2 RC Searching Custom Field in List View

    Hi All,

    I just updated an in progress website to 7.2 RC. I was hoping to take advantage of some of the updates to the ListView that have been made. However after adding in the some custom fields into the table I was hoping that I would be able to search by those custom feilds but unfortunatly not, is this something that I need to turn on somewhere or is this not possible and perhaps should be made as a feature request?

    Cheers

    L

  • Jan Skovgaard 11257 posts 23497 karma points MVP 7x admin c-trib
    Dec 02, 2014 @ 11:08
    Jan Skovgaard
    0

    Hi Lachlann

    It should be supported - You can read more about how it works in this blogpost about the beta http://umbraco.com/follow-us/blog-archive/2014/10/28/umbraco-720-beta-out-now

    Hope this helps.

    /Jan

  • Lachlann 325 posts 547 karma points
    Dec 02, 2014 @ 11:12
    Lachlann
    0

    Thanks Jan,

    I did read that blog post, I take it then that it should just be enabled by default. I have found that I am not able to access the search under the list view node. The only search i can access is on the list view itself and this does not seem to search within the custom fields, unless perhaps i need to reset my examin indexes?. There is no expand arrow on my list view document type. I wonder if my update did not work properly.

    Thanks for your help.

    L

  • Jan Skovgaard 11257 posts 23497 karma points MVP 7x admin c-trib
    Dec 02, 2014 @ 11:15
    Jan Skovgaard
    0

    Hi Lachlann

    Ok...not sure that rebuilding the indexes will fix this though but it's worth the try.

    Also try clearing the backoffice cache by deleting the /app_data/TEMP/ClientDependency files and increment the version attribute in /config/ClientDependency.config and see if it makes any change.

    Does that help any?

    /Jan

  • Lachlann 325 posts 547 karma points
    Dec 02, 2014 @ 11:20
    Lachlann
    0

    Hmm no luck so far. Whenever i search on the list view (i still dont get a search option under the node) it only searches on the node name, not any of the custom propertys i have added to the table.

    hmmm i wil keep looking.

    L

  • Jan Skovgaard 11257 posts 23497 karma points MVP 7x admin c-trib
    Dec 02, 2014 @ 11:23
    Jan Skovgaard
    0

    Hi Lachlann

    Do you see any errors in the console log of your browser? Or do you see any related info in the tracelog in /app_data/logs ?

    If not then I suspect it might be a bug.

    /Jan

  • Andy Butland 362 posts 1955 karma points MVP 4x c-trib
    Dec 02, 2014 @ 11:27
    Andy Butland
    1

    I believe that's the case actually - see here.  I contributed a little to this feature and remembered having a look at this... but not for very long, too hard for me I'm afraid :-)  At least with trying to do it as a database query as the content service currently uses.  The search here should perhaps be using Examine rather than a database query, in which case it would be easier to do searches on custom fields - but not sure how unpublished nodes should be handled then, so it's probably not that straightforward.

    Andy

  • Lachlann 325 posts 547 karma points
    Dec 02, 2014 @ 11:32
    Lachlann
    0

    Ahh okay thanks Andy. So the gist is that custom searching on fields isnt quite ready yet? Thanks for help and input guys.

    L

  • Shiraz 11 posts 33 karma points
    Jul 22, 2015 @ 10:09
    Shiraz
    2

    I was facing the same issue, I solved it by doing the following,

    I downloaded the umbraco cms source code 7.2.4. Added a new field called "search" in cmsDocument table. This field will contain the values of the custom fields. Add the bold text to Umbraco.Core.Persistence.Repositories.ContentRepository class, GetPagedResultsByQuery() method, sbWhere.Append(" OR (cmsDocument." + SqlSyntaxContext.SqlSyntaxProvider.GetQuotedColumnName("search") + " LIKE @" + args.Count + ")"); Should be just after line no: 730.

    Build the Umbraco.Core project and copy the bll to umbraco bin folder. Only other thing to do is, when Save and publish, register an event so that you could save the values in to Search field.

    Hope this will work, it worked for me. now i can search using custom fields.

    Cheers

    Shiraz

  • Alex Skrypnyk 5772 posts 21984 karma points MVP 4x admin c-trib
    1 week ago
    Alex Skrypnyk
    0

    Does it work in the latest version? Is it in core?

  • Alex Skrypnyk 5772 posts 21984 karma points MVP 4x admin c-trib
    1 week ago
    Alex Skrypnyk
    0

    Hi,

    Any news on this issue? Looks like in the latest version it doesn't work as well

Please Sign in or register to post replies

Write your reply to:

Draft