I use Solrnet to develop a search engine. In my application, I have a field called file_contents which I use for highlighting. Am able to get the highlights without a problem. Now I need to format it. For example, if the keyword occurs multiple times in the field, I have to display it lime what google does. May be like this.
GSMArena.com: Toshiba GSM cellphones. … Toshiba phones. Toshiba. Filters. Available · Coming soon · Smartphone · Touchscreen · Camera · Bluetooth · Wi-Fi …
Multiple snippets here are separated by “…”. I need to achieve something like this. Am able to get multiple snippets. But how do I deal with the separating?
Regards
Vignesh
Without much to go on in the question about what format the snippets data is in, assuming it’s in an array called
YourArrayOfSnippets, you’d do:And then use
joined_snippetshowever you see fit.In fact, SolrNet has a wiki page on highlighting with an example of how you might handle highlighting results, and even shows the use of
Join. Basically: