Copied to clipboard

Flag this post as spam?

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


  • Maff 141 posts 466 karma points
    Feb 02, 2015 @ 17:35
    Maff
    0

    ezSearch - can you set SearchFields to "all"?

    Hi,

    I'm dynamically adding field/value pairs into Examine when I index content (I'm using content snippets within pages and want the text within those snippets to be searchable).

    Because I'm dynamically adding these values into the Examine index, I don't know for sure what the field names will be, so can't explicitly define them in the SearchFields property of the ezSearch model.

    Is there a way to tell ezSearch to just search all fields rather than having to specify them?

    Thanks,

    Maff

  • Maff 141 posts 466 karma points
    Feb 03, 2015 @ 11:55
    Maff
    100

    So the way I've got around this (which is possibly is a bit heavy-handed) is to add a property to my "Site Settings" content item (which contains nav, footer, list values etc) to hold the Search Fields as a comma-separated string.

    Each time I dynamically add a field/value pair into examine for a piece of content, I add the field name (e.g. "_customContent1") to this Search Fields string.

    Then in my ezSearch macro I grab this property and feed it into the Model.

    This works fine, but If anyone has a better way approach please let me know!

    Cheers,

    Maff

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies