1

We are using solr in our application as a search engine. And for highlighting we are depending on solr result.

Query passed to solr for highlighting

hl.q=AddressLine1%3a(Puthanmadhom)+PartyNameBusiness%3a(Puthanmadhom)+AddressState%3a(All)+&q.op=OR&hl=true&hl.fl=*&hl.requireFieldMatch=true&hl.simple.pre=%3cb%3e&hl.simple.post=%3c%2fb%3e

Here the word "Puthanmadhom", is not highlighted in the solr results. But almost all other words are working fine. Even "Puthanmad" is highlighting properly.

Any possible reason of failure are welcome.

Thanks, Varun

Srikanth Venugopalan
  • 9,011
  • 3
  • 36
  • 76
Varun
  • 426
  • 3
  • 7
  • 18
  • Are you saying this query works? hl.q=AddressLine1%3a(Puthanmad)+PartyNameBusiness%3a(Puthanmad)+AddressState%3a(All)+&q.op=OR&hl=true&hl.fl=*&hl.requireFieldMatch=true&hl.simple.pre=%3cb%3e&hl.simple.post=%3c%2fb%3e – jro Jan 03 '14 at 08:17
  • Exactly. if I remove "hom", highlighting is happening. – Varun Jan 03 '14 at 09:00
  • Possibly related question: http://stackoverflow.com/q/12232302/802117 – Ansari Jan 03 '14 at 20:59

1 Answers1

1
hl.q=AddressLine1%3a(Puthanmadhom)+PartyNameBusiness%3a(Puthanmadhom)+AddressState%3a(All)+&q.op=OR&hl=true&hl.fl=*&hl.requireFieldMatch=true&hl.simple.pre=%3cb%3e&hl.simple.post=%3c%2fb%3e

This query string is broken by an extra space, after "...(All)+&q.op...". Change to "...(All)&q.op..." and it should work.

jro
  • 7,372
  • 2
  • 23
  • 36