Ignore:
Timestamp:
2015-07-25T07:27:52+12:00 (9 years ago)
Author:
Georgiy Litvinov
Message:

Solr repo fixes for highlighting bug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/solr/trunk/src/src/java/org/greenstone/gsdl3/util/SolrQueryWrapper.java

    r30050 r30057  
    559559            //Get highliting results
    560560            Map<String,Map<String,List<String>>> highlightingResults = solrResponse.getHighlighting();
    561             //Get highlited document text
    562             text = highlightingResults.get(hldocOID).get(highlight_field).get(0);
    563            
    564                                                
     561            // Check for existing highlighting results
     562            if (highlightingResults != null && highlightingResults.get(hldocOID) != null && highlightingResults.get(hldocOID).get(highlight_field) != null)
     563            {
     564                //Get highlited document text
     565                text = highlightingResults.get(hldocOID).get(highlight_field).get(0);
     566            }
    565567        }
    566568        catch (SolrServerException server_exception)
Note: See TracChangeset for help on using the changeset viewer.