We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49442
    • 1 Posts
    Hi all,

    We have a client whose content will occasionally include names with numbers in them that they would like to be searchable; eg. "Area 3" or "M1".

    We've found that SimpleSearch will break "Area 3" into two separate terms, "Area" and "3", and the results for these searches could contain either "Area" on its own or "3" on its own. The first result like this contains the word "area" four times but nothing at all for "3", even though there is a resource with "Area 3" in the page title as well as in the content on the third page of results. I've also tried setting andTerms to 0/false however this produces the exact same results.

    Below is what I've got at the moment;

    [[!SimpleSearch?
      &exclude=`74,75,76,79,110,77,78,111,112,113,114,115`
      &searchStyle=`match`
      &fieldPotency=`pagetitle:20,alias:10,content:5`
      &matchWildcard=`0`
      &minChars=`1`
      &useAllWords=`1`
      &andTerms=`0`
    ]]
    


    Has anyone else had any luck setting SimpleSearch to search for numbers or exact matches only?
    We were hoping for the results to be similar to searching on Google with speech marks around the term to get an exact match (preferably sorted by fieldPotency).

    Thanks,
    Paul