Jump to:

23490 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Setting Default Site Search to AND instead of OR

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 900 Views
  • Tama
    Avatar
    Community Member
    130 Posts

    Setting Default Site Search to AND instead of OR Link to this post

    Howdy

    I've tried searching for this but because of nature of the subject searching for "search and or" doesn't return very helpful results.

    When we run a search on our current website using multiple words it returns all the pages which contain some of the words.

    i.e. Searching for "quick brown fox"
    Returns all of the pages which contain "quick" OR "brown" OR "fox"

    What we'd really like is that if multiple words are typed in only pages contain all of the words.

    i.e. Searching for "quick brown fox"
    Returns only the pages which contain "quick" AND "brown" AND "fox"

    We can manually trigger this search by typing in "+quick +brown +fox" but would the search default to the AND behaviour. It should be possible to add "+" to the beginning of each word in the search terms but I was wondering if there's a more elegant way.

    How have other people gone about this?

    Cheers
    Tama

  • Tama
    Avatar
    Community Member
    130 Posts

    Re: Setting Default Site Search to AND instead of OR Link to this post

    Bump - surely others have come across this issue?

  • Shauna G
    Avatar
    Community Member
    52 Posts

    Re: Setting Default Site Search to AND instead of OR Link to this post

    Have you checked out the Sphinx Search module? It has a lot more features and options and might have what you're looking for.

  • Tama
    Avatar
    Community Member
    130 Posts

    Re: Setting Default Site Search to AND instead of OR Link to this post

    Hi Shauna

    I did look at Sphinx but our public launch is only a week away so trying to get that up and running along with everything else seemed like a mission and a half.

    Cheers
    Tama

    900 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.