Copied to clipboard

Flag this post as spam?

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


  • Chris 9 posts 29 karma points
    Jan 13, 2011 @ 22:56
    Chris
    0

    Examine Field / Document Boost

    Hello,

    We are currently switching an application's search function over to Examine from umbSearch2. Some fields are more important than others, and some documents are given a "boost" value that makes them appear higher in the rankings. We are having trouble figuring out how to accomplish the latter using Examine and the standard indexers.

    Would this require us to subclass ourselves a new indexer, or is there a more elegant solution? Examine's been nice to work with so far

    Thanks,

    Chris

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jan 13, 2011 @ 23:13
    Aaron Powell
    0

    Do you want to boost the terms when they go into the index, or when you're searching? The fluent API has extension methods in it that allows you to boost terms as you're searching.

  • Chris 9 posts 29 karma points
    Jan 14, 2011 @ 00:19
    Chris
    0

    For the terms, either is fine, but I'd also like to be able to apply a boost to certain documents as a whole (eg, make the pages that most people are trying to access show up higher, despite a lower search score under natural conditions). The original implementation might have been achieved by multiplying each term's 'boost' by some coefficient that varied by document (I don't currently have access to the original implementation's source.)

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jan 14, 2011 @ 06:28
    Aaron Powell
    0

    If you want to boost when something goes into the index then you'd need to create your own Indexer class and use that, Examine doesn't allow you to customize that OOTB.
    Well I suppose you could do it with the DocumentWriting event, but it'd be a bit of a tricky one to do IMO (and not something I've ever tried).

    Easiest way should be to do it when searching, and you can do that by the extensions methods which come with Examine for the FluentAPI, and just do a search on the NodeTypeAlias and boost it.

  • Chris 9 posts 29 karma points
    Jan 20, 2011 @ 17:25
    Chris
    0

    I did end up doing that, and the boost is working now -- thank you.

    I am now running into another issue, though - how can I combine Fuzzy with Boost? I'm trying to do:

    searchTerm.Fuzzy().Then().Boost(boostiness)

    but am getting an ArgumentNullException on s. I also tried

    searchTerm.Fuzzy.Then(searchTerm).Boost(boostiness)

    which solves the ArgumentNullException, but prevents Examine from returning results. The same thing happens if I use Boost and Fuzzy in the other order. I am probably doing something wrong, but am not sure what that would be.

  • Connie DeCinko 931 posts 1160 karma points
    Jul 20, 2012 @ 00:05
    Connie DeCinko
    0

    Has anyone been able to get fuzzy and boost to work together?  I works when testing in Luke.

Please Sign in or register to post replies

Write your reply to:

Draft