Hit highlighting possible bug

View: New views
3 Messages — Rating Filter:   Alert me  

Hit highlighting possible bug

by Roy Walter-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Consider the following:

    "On 2 July we moved to the treatment phase of the response to swine
    flu and we are now using clinical diagnosis instead of laboratory
    confirmation to identify cases of swine flu. This means we can no
    longer give detailed data about the precise number of cases.
    However, we have well-established seasonal influenza surveillance
    systems to monitor the spread, activity and impact of swine flu."

    <span class="previous">On  2 July  we moved to the treatment phase
    of the response to </span>
    <a class="hi" href="#">swine flu and we are now using clinical
    diagnosis instead of laboratory confirmation to identify cases of
    swine flu. This means we can no longer give detailed data about the
    precise number of cases. However, we have well-established seasonal
    influenza surveillance systems to monitor the spread, activity and
    impact of swine flu</a>
    <span class="following">swine  flu. This means we can no longer give
    detailed data about the precise number of cases. However, we have
    well-established seasonal influenza surveillance systems to monitor
    the spread, activity and impact of  swine  flu.</span>

The first paragraph is the actual text and the second paragraph is the
same text after performing a phrase search for "swine flu".

The problem to my eyes is that when the search phrase occurs several
times in close proximity all ocurrences are "<span>ned" by a single
span. This may be expected behaviour but it looks a little odd on screen
when hits are highlighted with a background-color, i.e., the highlight
block is very large and encompasses more than just the sought phrase.

Also, as above, it leads to odd looking constructs, such as, "...impact
of swine flu</a><span class="following">swine flu...."

-- Roy

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: Hit highlighting possible bug

by Roy Walter-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Anyone have a view on this? Here's another example:

    <span class="previous">We have in the borough of Kettering a </span>
    <span class="hi">wind farm at Burton Wold. There are 10 turbines,
    which generate 20 MW of electricity. That is enough to power 10,000
    homes in the borough, which is somewhere between a quarter and third
    of the local population. Not everyone is in favour of the Burton
    Wold wind farm, but many are—it is fair to say, on balance, that it
    enjoys popular support from my constituents, in particular from the
    residents of Burton Latimer, which is the nearest town. Local
    schoolchildren have given each of the turbines a name and the Burton
    Wold Wind Farm company makes a valuable contribution each year to
    town council funds to help local projects in the community. On
    balance, it is a very popular wind farm</span>
    <span class="following">wind farm, but many are—it is fair to say,
    on balance, that it enjoys popular supp ...</span>

Note that in the "following" span the text is a repetition of some of
what appears in the "hi" span.

-- Roy


Roy Walter wrote:

> Consider the following:
>
>     "On 2 July we moved to the treatment phase of the response to swine
>     flu and we are now using clinical diagnosis instead of laboratory
>     confirmation to identify cases of swine flu. This means we can no
>     longer give detailed data about the precise number of cases.
>     However, we have well-established seasonal influenza surveillance
>     systems to monitor the spread, activity and impact of swine flu."
>
>     <span class="previous">On  2 July  we moved to the treatment phase
>     of the response to </span>
>     <a class="hi" href="#">swine flu and we are now using clinical
>     diagnosis instead of laboratory confirmation to identify cases of
>     swine flu. This means we can no longer give detailed data about the
>     precise number of cases. However, we have well-established seasonal
>     influenza surveillance systems to monitor the spread, activity and
>     impact of swine flu</a>
>     <span class="following">swine  flu. This means we can no longer give
>     detailed data about the precise number of cases. However, we have
>     well-established seasonal influenza surveillance systems to monitor
>     the spread, activity and impact of  swine  flu.</span>
>
> The first paragraph is the actual text and the second paragraph is the
> same text after performing a phrase search for "swine flu".
>
> The problem to my eyes is that when the search phrase occurs several
> times in close proximity all ocurrences are "<span>ned" by a single
> span. This may be expected behaviour but it looks a little odd on screen
> when hits are highlighted with a background-color, i.e., the highlight
> block is very large and encompasses more than just the sought phrase.
>
> Also, as above, it leads to odd looking constructs, such as, "...impact
> of swine flu</a><span class="following">swine flu...."
>
> -- Roy
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Exist-open mailing list
> Exist-open@...
> https://lists.sourceforge.net/lists/listinfo/exist-open
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.409 / Virus Database: 270.13.112/2387 - Release Date: 09/21/09 17:55:00
>
>  

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: Hit highlighting possible bug

by Wolfgang Meier-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I fixed this issue:

http://exist.svn.sourceforge.net/exist/?rev=10316&view=rev

Thanks for reporting,

Wolfgang

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open