How to write query to cloud search to get result on partial text match
Asked Answered
A

0

6

I'm adding a search by name options in my current CloudSeach integration. I'm searching for a key name by passing phrase field=name 'Stratosphere Hotel, Casino' for filter_query. This is working fine if I have an exact name match. But my search input for name is coming from google maps API and the data in my CloudSeach may not have an exact match with values in name key.

ie.

search input: DoubleTree by Hilton Hotel Irvine - Spectrum 
CloudSeach value: DoubleTree by Hilton Irvine - Spectrum

search input: Candlewood Suites OC Airport- Irvine West Extended Stay Hotel 
CloudSeach value: Candlewood Suites OC Airport-Irvine West

I have looked into near, fuzzy logic docks but I'm fairly new to CloudSeach.

https://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-text.html https://docs.aws.amazon.com/cloudsearch/latest/developerguide/filtering-results.html

Is there any way to do a partial word search and match it and return those data. BTW 80% the data is matching names with CloudSeach's uploaded data, it's just around 20% data I'm having a problem searching with.

Anus answered 25/7, 2019 at 11:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.