Issue 10535

Show and highlight search matches in species description

10535
Reporter: ahahn
Assignee: mdoering
Type: Improvement
Summary: Show and highlight search matches in species description
Priority: Major
Resolution: Fixed
Status: Closed
Created: 2011-12-16 10:08:28.661
Updated: 2013-08-29 14:45:47.408
Resolved: 2012-06-08 09:49:35.921
TimeEstimate: 0
TimeSpent: 14400
        
Description: As search for "collembola" (text field), with threat status "102870 selected, results in a list of 6.
- For four of them, higher taxonomy looks all right, relating to Collembola, but common names suggest bats, as do the descriptive data. A homonym issue?
- The two birds are contained because the habitat description gives "Collembola" as part of their diet. At some point there was a plan to include a line in the result overview, cutting +/- five words before and after the highlighted keyword: "...Ichneumon wasps and aphids) and _Collembola_ (springtails), as well as spiders,...", to help understand why the record is included. Do we still want to do this?

http://staging.gbif.org:8080/portal-web-dynamic/species/search?q=collembola&checklist=d7dddbf4-2cf0-4f39-9b2a-bb099caae36c&checklist=d7dddbf4-2cf0-4f39-9b2a-bb099caae36c&initDefault=false&threat=102870

]]>
    


Author: mdoering@gbif.org
Comment: Yes, I think we do want this. Im renaming the title to express this
Created: 2011-12-19 10:29:07.009
Updated: 2011-12-19 10:29:07.009


Author: fmendez@gbif.org
Comment: This feature was implemented. The UI should be improved for displaying the full text of description in a better way, in this version was implemented using the available "popover" widgets. Aditionally, in cases when a Name Usage contains several descriptions, the UI is not intuitive for localize descriptions underneath a usage.
Created: 2012-02-06 10:42:54.058
Updated: 2012-02-06 10:42:54.058


Author: mdoering@gbif.org
Created: 2012-02-06 11:04:27.113
Updated: 2012-02-06 11:04:27.113
        
Id be in favor of not showing complete descriptions at all. Some nub species have more than 10 english descriptions, each being rather long so that several screen pages would be filled.

Id like to reopen this issue to show the vicinity of the highlighted match only, similar to google. Something like 50-100 characters before the match and after. And only show the description if there was a match at all.
    


Author: fmendez@gbif.org
Comment: Markus, is implemented is that way, only shows 80 characters after/before the match, and onlu descriptions that match are displayed. The issue is that even with that if N descriptions of a Name Usage match against the criteria, displaying all those descriptions could be confusing for the user.
Created: 2012-02-06 11:23:19.255
Updated: 2012-02-06 11:23:19.255


Author: mdoering@gbif.org
Created: 2012-02-06 11:43:10.251
Updated: 2012-02-06 11:43:10.251
        
I can't see it on staging yet, so hard to tell.
This search should probably hit 2 descriptions:
http://staging.gbif.org:8080/portal-web-dynamic/species/search?q=Ichneumon+wasps&checklist=d7dddbf4-2cf0-4f39-9b2a-bb099caae36c&checklist=d7dddbf4-2cf0-4f39-9b2a-bb099caae36c
    


Author: mdoering@gbif.org
Comment: Maybe only show one description in case we hit several? then we always only have 1 or 2 lines to show and can remove the popover
Created: 2012-02-06 11:43:53.806
Updated: 2012-02-06 11:43:53.806


Author: mdoering@gbif.org
Created: 2012-02-06 12:26:20.647
Updated: 2012-02-06 12:26:20.647
        
I would remove the "Description" heading and the popover note to not clutter the UI.
Otherwise nice!
    


Author: mdoering@gbif.org
Created: 2012-02-06 12:27:13.638
Updated: 2012-02-06 12:27:13.638
        
Im not getting highlighting on this one:
http://staging.gbif.org:8080/portal-web-dynamic/species/search?q=Ichneumon+wasps&checklist=d7dddbf4-2cf0-4f39-9b2a-bb099caae36c&checklist=d7dddbf4-2cf0-4f39-9b2a-bb099caae36c

Maybe its because the query uses 2 words?

http://staging.gbif.org:8080/portal-web-dynamic/species/2435989
definitely contains the phrase "ichneumon wasps"
    


Author: fmendez@gbif.org
Comment: Text highlighting fixed: text replacement was not considering cases when the text already contains the '<em>' tag,
Created: 2012-06-08 09:49:35.954
Updated: 2012-06-08 09:49:35.954