Copied to clipboard

Flag this post as spam?

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


  • Nik Wahlberg 639 posts 1237 karma points MVP
    Aug 30, 2010 @ 16:09
    Nik Wahlberg
    2

    Examine case-sensitive

    Hi all,

    I feel like a broken record with Examine, so sorry about yet another post on the subject :) 

    Has anyone been able to get the latest RC3 release of Exmine to work with case-insensitive searches? The indexer now saves the proper case workds, but when searching we unfortuantely get somewhat dirty results since a search fro "Contact Us" brings up the expected results but "contact us" does not. This means the user would have to know how the author typed in text in order to find something. Not great...

    Thanks for any tips you have...

    Cheers,
    Nik

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Aug 31, 2010 @ 00:51
    Aaron Powell
    0

    Are you specifying a different analyzer from the default?

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Aug 31, 2010 @ 01:01
    Nik Wahlberg
    0

    Hi Slace, no I have the standard specified (just like the Internal one)....

    Lucene.Net.Analysis.WhitespaceAnalyzer, Lucene.Net

    -- Nik

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Aug 31, 2010 @ 01:05
    Aaron Powell
    1

    The WhitespaceAnalyzer isn't the standard one, StandardAnalyzer is the standard one. The reason that WhitespaceAnalyzer is used for the internal indexer & searcher is so we don't have to worry about special characters or anything when creating the back-office search.

    The WhitespaceAnalyzer is a case-sensitive searcher, where Contact Us != contact us, as I covered here: http://farmcode.org/post/2010/08/23/Text-casing-and-Examine.aspx

    If you want case-insensitive searching you need to use a case-insensitive analyzer. If you want case-insensitive searching and original cased displaying you'll need to use the technique I covered in the blog.

  • Hein 29 posts 158 karma points
    Sep 28, 2017 @ 14:42
    Hein
    0

    Can you explain it please? The link is broken.

  • Liam Laverty 8 posts 100 karma points c-trib
    Sep 28, 2017 @ 15:30
    Liam Laverty
    0

    Fresh link to the blog post above:

    https://shazwazza.com/post/Text-casing-and-Examine

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Aug 31, 2010 @ 01:13
    Nik Wahlberg
    0

    Sweet mother! :) Thank you for that tip...of course had I looked at codeplex I would have found the StandardAnalyzer there :) 

    Thanks again man.

    -- Nik

  • Bo Kingo Damgaard 157 posts 456 karma points
    Jul 10, 2012 @ 12:43
    Bo Kingo Damgaard
    0

    @slace any chance of you posting a working link to the blogpost, as it seems that Farmcode's blog got lost with the new website?

    Cheers

    Bo

  • MikeD 92 posts 112 karma points
    Sep 05, 2012 @ 23:35
    MikeD
    0

    Yo Slace... wha happened to that post?  I need that info!  lol

    What I am trying to do is to search specific nodes based on a radio button on the search form (searchField).  When I leave this filtering off, I get results back no matter what case I use in my search box (searchTerm). Oh, Umbraco 4.8 is the environment...

     <xsl:for-each select="$searchResult/nodes/node[./data[@alias = $searchField] = $searchTerm]">

    If I select 'city" and search for "Madison", I get results, but if I search for "madison" I get none.

    One more question... is there a way to do a %like% in my filter?  For example, I have a "name" John Q. Public.  I search for "Public".  With the current fllter, I get no results.  What I need is something along these lines:

     <xsl:for-each select="$searchResult/nodes/node[./data[@alias = $searchField] LIKE $searchTerm]">

    Thanks in advance to anyone who can point me in the right direction!

    -Mike D
  • MikeD 92 posts 112 karma points
    Sep 06, 2012 @ 00:01
    MikeD
    0

    I figured out the LIKE part... still have issue with the case part.

    <xsl:for-each select="$searchResult/nodes/node [contains(./data[@alias = $searchField], $searchTerm)]">

     

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Sep 06, 2012 @ 01:02
    Aaron Powell
    2

    TheFARM have taken down farmcode (as people are becoming aware). I've migrated the blog content to my website - http://www.aaron-powell.com/text-casing-and-examine

    No idea if it still works or is still relevent, it should be but no promises

  • Hein 29 posts 158 karma points
    Sep 28, 2017 @ 14:44
    Hein
    0

    Could you update your post please? The link is broken.

Please Sign in or register to post replies

Write your reply to:

Draft