Copied to clipboard

Flag this post as spam?

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


  • Stig Kulvedrøsten 48 posts 69 karma points
    Sep 01, 2011 @ 11:45
    Stig Kulvedrøsten
    0

    Examine analyzer

    One of my properties being indexed has the following format: "this is value 1,this is value 2,this is value 3"

    I dont want the indexer to split this property on whitespace, but on comma. Can I use a different analyzer?

    How can I query this to get a match on each split value? Now I have to do a fuzzy query and then I get hits on all of them if I e.g. use the following query "this is value 1"

    Any suggestions? Different analyzer?

    Stig

  • Rich Green 2246 posts 4008 karma points
    Sep 01, 2011 @ 11:53
    Rich Green
    0

    Hey Stig,

    Check out this blog post here http://www.farmcode.org/category/uComponents.aspx this is splitting the CSV values of the uComponents MNTP but you can use the same process to split your values by comma.

    Code sample also here http://our.umbraco.org/forum/developers/extending-umbraco/11667-GatheringNodeData-examine-event?p=0

    Rich

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Dec 22, 2011 @ 12:13
    Tim
    0

    @Stig, you could use the Examine indexing events to replace commas with spaces maybe?

  • Michael Sims 119 posts 387 karma points
    Jul 09, 2012 @ 12:40
    Michael Sims
    0

    Hi Stig,
    I believe I have the same requirement as you.

    Firstly, I have an index set that has user fields with the following format: "1234,1236,2345". At present I can only get it to match this field if the content is exact, i.e. if I update the field to just "1234" and search for that exact term. Can I ask how you solved this? Were you using an incorrect analyzer?

    Secondly, how did you handle matching as you asked above. I want to search for "1234" and it to return the node containing the value "1234,1236,2345" in the property specified in my user-defined fields index.

  • 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