0

I'm trying to use Solspace Supersearch to do a location lookup for franchisees. Each franchisee has an 'areas covered' field that lists a comprehensive list of the areas the cover (both towns and postcodes).

The trouble is that we are only listing the first 4 characters of postcodes (otheriwse we'd be listing millions) but want to display results even if someone searches for a full post code.

Example: One entry has the postcode 'PE25' listed. If a user searches for 'PE25 123' then the entry is found, but if the user searches 'PE25123' then no entry is found.

{exp:super_search:results 
    channel="technicians"
    where="any"
    inclusive_keywords="no"
}

What I'd like to happen is for supersearch to see that 'PE25123 contains 'PE25' and display the result. I've tried to play around with 'inclusive_keywords' and 'search_words_within_words' with no luck.

Any ideas would be massively appreciated as this one's got me stumpted!

Thanks in advance,

Tom

  • Just to confirm... you're wanting a keyword search for "PE25123" to find results for "PE25"? If so, that is not possible. The search would work the other way around though (a keyword search for "PE25" to find results for "PE25123", with the search_words_within_words="no" parameter set. :) – Solspace Mar 10 '15 at 1:18
  • That's correct, I'm aiming to set searches for 'PE25123' to find a result containing 'PE25'. That's a real shame and surprising if that's not possible. Any reason why that option's not available? – Tom Perkins Mar 10 '15 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.