lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Binda <olivier.bi...@wanadoo.fr>
Subject Re: Highlighting text, do I seriously have to reimplement this from scratch?
Date Wed, 05 Feb 2014 15:11:10 GMT
On 02/05/2014 01:05 AM, Michael Sokolov wrote:
> On 2/4/2014 2:50 PM, Earl Hood wrote:
>> On Tue, Feb 4, 2014 at 1:16 PM, Michael Sokolov wrote:
>>
>>> You might be interested in looking at Lux, which layers XML services 
>>> like
>>> XQuery on top of Lucene and Solr, and includes an XML-aware 
>>> highlighter:
>>> https://github.com/msokolov/lux/blob/master/src/main/java/lux/search/highlight/XmlHighlighter.java

>>>
>> I am aware of Lux, but moving to use it would be a major redesign effort
>> for the project I am on, something that likely would not get management
>> approval.
>>
>> BTW, just within the scope of the class you cite, doing a quick look at
>> it, it looks like I may have to modify highlighting code behavior to
>> support how the project I am transforms the XML data.  Example: we deal
>> with attribute data that gets transformed to render content in the HTML
>> served to the client, and the highlighting code cited does not appear to
>> handle XML attributes.
>>
>> There are other technical challenges also due to the nature of the
>> project.  There may be ways deal with the challenges, but any further
>> analysis is not worth it if there is never any approval for me to pursue
>> a redesign for the project.
>>
> Thanks for the feedback.  I think it's difficult to know what to do 
> about attribute value highlighting in the general case - do you have 
> any suggestions?
>

Would it be possible/interesting to have an interface that let's the 
caller decide what to do with the attribute  ?

This has nothing to do with xml higlighting but , on Android, I had to 
hack a bit (nothing comparable to what is suggested here) the 
highlighter class to enable it to directly produce an Android Spanned  
String (basically a String with spans attached to it) instead of 
producing a String with html content (that must be parsed into an 
Android Spanned String) ... The Formatter Class is nice but maybee it 
could be improved a bit to be more flexible.


Olivier

> -Mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message