the query contained some experimenting code. The correct one is: 
http://localhost:8983/solr/autocompleteCore/select?fl=name_display,importance,score&wt=xml&q={!boost
b=log(importance)}(prefix1:"or" OR prefix2:"or")&hl=true&hl.fl=prefix1

Moreover, Is there a way to simply add the result of highlighting to the
fl-parameter, so I can just read the annotated name (including highlighting)
instead of the normal name.  (analogously as you can apply 'score' to fl.) 
To me, this would seem like the perfect way to get the highlighted result
without having to supply additional code in a client. You would only need to
refer to the annotated field name...


Britske wrote:
> 
> first time I'm using highlighting and results work ok. 
> Im using it for an auto-suggest function. For reference I used the 
> following query: 
> 
> http://localhost:8983/solr/autocompleteCore/select?fl=name_display,importance,score,hl&id&wt=xml&q={!boost
> b=log(importance)}(prefix1:"or" OR prefix2:"or")&hl=true&hl.fl=prefix1
> 
> However, when using solrJ I can't get to the actual highlighted results,
> i.e:  
> 
> QueryResponse.getHighlighting() shows me a map  as follows: 
> {2-1-57010={}, 2-7-8481={}, ....} which I can't use because the result is
> empty.(?) 
> 
> but debugging I see a field: 
> QueryResponse._highlightingInfo with contents: 
> {1-4167147={prefix1=[<em>Orl</em>ando Verenigde Staten]},....}
> which is exactly what I need. 
> 
> However there is no (public) method: 
> QueryRepsonse.getHighlightingInfo() !
> 
> what am I missing? 
> 
> thanks, 
> Britske
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-get-to-highlitghting-results-using-solrJ-tp23986063p23986127.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to