This PR softens the case-sensitivity rules in Javadoc searches by including 
results of case-insensitive search if a case-sensitive yields no or very few 
results. 

Changes also include some restructuring of the search.js code along with minor 
changes that improve compliance with the specification (Segments separated by 
`_` are ranked the same way as segments of CamelCase identifiers, and matches 
on such segments are ranked lower than matches for whole identifiers, which 
wasn't always the case previously)

The `TestSearchScript.java` test, which has been disabled with the removal of 
Nashorn, has been updated to run without failure. In the process, I noticed 
that the recent IndexBuilder|Writer|Item refactoring, comparators have been 
unified to the point that the same item order is used in HTML index pages and 
the search index JSON files. However, there used to be slight differences in 
the sorting between the two. This change restores the original order by adding 
two simple search index comparators to `IndexBuilder.java`.

API documentation generated with this PR applied can be viewed and tested here: 
http://cr.openjdk.java.net/~hannesw/8244535/api.01/

-------------

Commit messages:
 - Undo stylesheet changes
 - Make sure full match is ranked higher than partial one
 - Undo pattern change
 - Fine-tune search algorithm
 - JDK-8244535: JavaDoc search is overly strict with letter case

Changes: https://git.openjdk.java.net/jdk/pull/1354/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1354&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8244535
  Stats: 201 lines in 5 files changed: 66 ins; 52 del; 83 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1354.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1354/head:pull/1354

PR: https://git.openjdk.java.net/jdk/pull/1354

Reply via email to