Copied to clipboard

Flag this post as spam?

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


  • Mayank Parmar 2 posts 22 karma points
    Feb 16, 2011 @ 08:38
    Mayank Parmar
    0

    previewFields against searchFields

    I have integrated XSLTSearch package in my website. And it is working great !!!

    But I am facing one minor problem with the same.

    I have created one document type with 4 properties: OverviewPurpose, Accountability, Measurements, ProcessDetail

    And I have included all of them in both searchFields and previewFields.

    Also I have set previewType="CONTEXT" and previewChars="250"

    But now when I search for some keyword like "Omni" then it search in all 4 properties and comes back with the correct list of links.

    But it shows preview for only 1st property and if not found in 1st property, it comes with "Context: unavailable".

    Like if I set previewFields="OverviewPurpose, Accountability, Measurements, ProcessDetail" then it shows preview for only "OverviewPurpose" and for "Accountability, Measurements, ProcessDetail" it will show "Context: unavailable".

    And same way if I set previewFields="ProcessDetail, OverviewPurpose, Accountability, Measurements" then it shows preview for only "ProcessDetail" and for "OverviewPurpose, Accountability, Measurements" it will show "Context: unavailable".

    Regards,

    Mayank Parmar

    +91 9727748789

    [email protected]

  • Douglas Robar 3570 posts 4671 karma points MVP 6x admin c-trib
    Mar 09, 2011 @ 16:54
    Douglas Robar
    0

    Hi, Mayank,

    Thanks for your excellent bug report! I've tried to recreate the problem but can't with XSLTsearch 3.0.

    Are you using XSLTsearch 3.0?

     

    The only time you should see "Context: unavailable" is if the search term is found in one of the searchFields= properties that isn't also listed in the previewFields= properties. This can happen, for instance, if you include @nodeName in the searchFields since it can't be included in the previewFields parameter. 

    In my test I created a new docType with three properties with aliases used nowhere else in my site. I put text in only one of the three properties on all the pages. I then used the following for my macro:

    <umbraco:Macro runat="server" Alias="XSLTsearch"
          macroAlias="XSLTsearch"
          source="-1"
          searchFields="doug,overview,detail"
          previewFields="detail,overview,doug"
          previewType="context" ...

    Everything worked properly and I saw contextual results displayed from each of the properties.

     

    However, when I added bodyText to the searchFields= parameter (but not the previewFields= parameter), I would get search results that matched the search term because it was found within the bodyText property... but the search results showed "Context: unavailable" because bodyText wasn't one of the allowed previewFields.

     

    I hope this helps. Let me know if you're using XSLTsearch 3.0.

    cheers,
    doug.

  • Mayank Parmar 2 posts 22 karma points
    Mar 10, 2011 @ 15:37
    Mayank Parmar
    0

    I was using this file.

    ======================================================================
     XSLTsearch.xslt
     ======================================================================
     Copyright 2006-2009 Percipient Studios. All rights reserved.
     MIT License (http://www.opensource.org/licenses/mit-license.php)

     Version 2.8

     www.percipientstudios.com
     ======================================================================

    Tomorrow I will try to install v3.0 and review again.

    Thanks for the help !!!

    And just wanted to let you know that it is working wonderful in my website and I am glad to use it.

    Regards,

    Mayank Parmar

    +91 9727748789

Please Sign in or register to post replies

Write your reply to:

Draft