Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 338
  • Last Modified:

Apache Solr Search how to Highlight

Hi..
I have a search that returns JSON with the highlighting feature. It returns addtional JSON like
this

"highlighting":{
    "903514":{
      "details":["<em>Smith</em>"],
      "text":["<em>Smith</em>"]},


How can use JS to use this JSON and highlight the search results text in HTML page?

Any ideas?
0
JElster
Asked:
JElster
  • 3
2 Solutions
 
James RodgersWeb Applications DeveloperCommented:
solr has a built in highlihtong settings and option, how are you  calling the search?
0
 
JElsterAuthor Commented:
...wt=json&indent=true&hl=true&hl.simple.pre=%3Cem%3E&hl.simple.post=%3C%2Fem%3E'

I need to findout how I can process the returned JSON t to show the highlighted text
0
 
James RodgersWeb Applications DeveloperCommented:
Have a look at  this to see how the json is parsed for highlighting
http://wiki.apache.org/solr/SolJSON
contained within the function updatepage block
0
 
James RodgersWeb Applications DeveloperCommented:
glad i could help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now