Copied to clipboard

Flag this post as spam?

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


  • Paul Blair 466 posts 731 karma points
    May 09, 2012 @ 04:01
    Paul Blair
    0

    Examine - fuzzy sort

    Hi,

    I have a tricky problem I'm trying solve with Examine. The requirements are to bring back all Articles in the system with those that match the search criteria sorted to the top.

    That part is working fine and my search criteria looks like:

    query = searchCriteria.Field("PageTitle", searchTerm.Boost(8)).Or().Field("bodyText", searchTerm.Boost(5)).Or().NodeTypeAlias("Article").Compile();

    In addition to the above we would like the articles for each field(Page Title, Body, not matched) to be sorted roughly by a another field: NumReads; which is a weight representing the popularity of the Article.

    I'm not sure how to achieve this. Does anyone have any ideas?

    Thanks

    Paul

Please Sign in or register to post replies

Write your reply to:

Draft