1

I Have an index called Popular Songs and the document type is Song. Each Document has a field called "lyrics" which contains the lyrics of the specific song.

I want to query for all the Songs starting with Word "Love" not the songs content word "Love". Can someone kindly give me an idea ?

Thanks

Sample document


     "title":["I Like You So Much You'll Know It"],
     "artist":["Honey Jemlan"],
     "rank":[286],
     "genre":["Dubstep"],
     "duration":[271.43791],
     "hitrate":[0.42],
     "bpm":[135.914],
     "year":[1993],
     "lyrics":["Love you every minute every second  Love you everywhere and any moment  Always and forever I know I can't quit you  'Cause baby you're the one I don't know how"],
     "id":"ffadbb19-195d-4089-8d31-163d7e3055d2",
     "_web_scraper_order":["1592132318-2867"],
     "_version_":1669613422920073216},```
  • Index it as a separate field that has the type `string` and search for `lyrics_str:Love*`. In schemaless mode Solr adds this field by default for you. – MatsLindh Jun 16 '20 at 06:46
  • Wat is the problem in querying `lyrics:Love*`? Are you separating multi line by comma in the multivalued field? – Gibbs Jun 19 '20 at 10:43

0 Answers0