2

I'd like to create "movie characters result suggest" with Elasticsearch. I just finished reading this tutorial and lot of other resources, but I need a help :/

I want to get results when I type:

  1. any first characters from name
  2. or any first characters from tags
  3. or any first characters address

I use twitter typeahead.js for frontend, and when I type e.g. "dr", the results should be:

John Lock
Address: Main Street, Anytown   | Hobby: Outdoors (Driving)
-----------------------------------------------------------
Anna Lucia
Address: Westover Lane, Florida | Hobby: Indoors (Drawing)

...match by tags (Driving, Drawing)

The questions are:

  1. Is this clear? (saving all tags for hobby types each every document)
  2. It's possible to get which property was matched? (or I must do it in javascript callback)

Thank you for your patience!

EDIT: Second point maybe resolve with hightlight feature, but it's possible to highlight item in list (array) property? Updated gist (I'd like highlight payload in last query)

nagmanat
  • 29
  • 3

0 Answers0