Copied to clipboard

Flag this post as spam?

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


  • Jenni Marsh 26 posts 46 karma points
    Sep 11, 2012 @ 14:49
    Jenni Marsh
    0

    Examine search results: issue with hyphens?

    Hi Guys!

    I originally posted this on the Umbraco API forum but have got zero response, so I'm hoping this might be a better forum to post this in.

    I have got a load of products that are indexed in Examine, and I am doing searches on part codes. The weird thing is that my searches are returning results if I search for part of the code, but in some cases not if I search for the code exactly.

    For example, I have a part code WS-C3750-24FS-S in my database.

    If I search for "WS-C3750-24FS-S" then it doesn't return any results.
    If I search for "WS-C3750-24FS-" (minus the last S) then it doesn't return any results.
    If I search for "WS-C3750-24FS" (minus the last two characters "-S") then it returns my product!


    Another example is the part code BS-START-VCO in my database.

    If I search for "BS-START-VCO" then it doesn't return any results.
    I have to reduce this down to just "BS" before it returns BS-START-VCO.


    It looks like Examine has some sort of issue with the hyphens in the product codes. Is it using them as a wildcard or something?

    My code to do the search is:

    Dim SearchResults = ExamineManager.Instance.SearchProviderCollection("ProductIndex").Search(SearchTerm & "*", True)

    My indexer is configured like this:

    <add name="ProductIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"supportUnpublished="false" analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net" indexSet="ProducttIndexSet"/>

     

    Can anyone help please?
    Jenni
    xx

  • Rob Epler 3 posts 25 karma points
    Apr 30, 2014 @ 18:52
    Rob Epler
    0

    Did you ever find a solution? This seems to still be an issue even with v7+

  • Jason D 66 posts 218 karma points
    Mar 10, 2021 @ 23:27
    Jason D
    0

    This has me stuck too. I'm simply trying to do a search for (example) "HB6M-?-?-S-?" and it strips the hyphens and question marks, so then the "S" can be in any ? spot and it'll match...

Please Sign in or register to post replies

Write your reply to:

Draft