ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How to search for exact word

August 28, 2012 9:27am

Subscribe [2]
  • #1 / Aug 28, 2012 9:27am

    atle

    29 posts

    Hi, I’m using the simple search-form, and when searchiing for a short word like “sel”, I get results for “selfjord”, “selbu” and other words starting with “sel”. I’d really like the search to return only the exact result for the letters searched for.  Any way of doing that with the native search module? I see Low’s module has that abiliy, but native is best 😉

  • #2 / Aug 28, 2012 4:45pm

    Shane Eckert

    7174 posts

    Hello atle,

    Thank you for posting your question here on the ExpressionEngine forums.

    The Advanced Search Form has an exact phrase match input that I think will do what you are looking to do.

    Cheers,

  • #3 / Aug 29, 2012 3:19am

    atle

    29 posts

    Hi Shane, thanks for the quick reply!

    I looked at the user guide for the advanced search, but couldn’t see any parameters like “where=‘exact’”, so I figured I couldn’t use it. And also: the simple search has that parameter, but it either returns no results (which I suspect has to do with the number of characters…) or still returns words containing the letters.

    But feel free to close this thread anyway, I read so many forum posts about the subject, and decided to do the lazy thing and buy Low Search 😉

  • #4 / Aug 29, 2012 1:45pm

    Shane Eckert

    7174 posts

    Hey atle,

    So this did not work for you?

    <select name="where">
                                    <option value="exact" selected="selected">{lang:exact_phrase_match}</option>
                                    <option value="any">{lang:search_any_words}</option>
                                    <option value="all" >{lang:search_all_words}</option>
                                    <option value="word" >{lang:search_exact_word}</option>
                            </select>

    That’s a bummer.

    I can still close this out since you are using low search now, but if you would like we can continue to troubleshoot.

    Please let me know.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases