DZone
Java Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Java Zone > Little Known Things about the Eclipse Infocenter: Search Links (3/5)

Little Known Things about the Eclipse Infocenter: Search Links (3/5)

Holger Voormann user avatar by
Holger Voormann
·
Nov. 14, 14 · Java Zone · Interview
Like (0)
Save
Tweet
5.47K Views

Join the DZone community and get the full member experience.

Join For Free

{editor's note: we posted a summary of holger voormann's tips about the eclipse infocenter a few weeks ago . we are now excited to have holger as a dzone mvb, and will be publishing his full infocenter articles this week. make sure to check out holger's blog, eclipse howl .}

the eclipse infocenter is the eclipse help system launched as a web application. two of five well-hidden features about the infocenter have already been presented here. after basic and bot mode and deep linking here comes little known thing number three: search links.

search links are queries which can be used for sharing or creating a search input field in or outside the infocenter. you can search all content, a single book or a single chapter. to search all content you have to append /index.jsp?tab=search&searchword=… to the base infocenter address like in this example of searching for eclipse runtime options within the eclipse luna online help . the following html snippet creates a search field for luna help:

    <form action="http://help.eclipse.org/luna/index.jsp"
          method="get" accept-charset="utf-8">
        <input type="hidden" name="tab" value="search">
        <input name="searchword">
        <input type="submit" value="search">
    </form>

in order to search within a book you have to use the toc parameter in addition to the tab and searchword parameters as well as quicksearch=true and
quicksearchtype=quicksearchtoc : /index.jsp?tab=search &quicksearch=true&quicksearchtype=quicksearchtoc&toc=… &searchword=… to get the value for the toc parameter, open /basic/searchview.jsp?searchword=-&scopedsearch=true , select one book, click the go button and get the value from the scope parameter of the new url.

getting the value for 'toc'

a chapter can be specified by the path parameter: /index.jsp?tab=search&quicksearch=true&quicksearchtype=quicksearchtoc&toc=… &path=… &searchword=… the value of tab is a tuple of subchapter indexes starting with 0 separated by underscores. for example path=0_2 refers to the third subchapter of the first top-level chapter of the book specified by the toc parameter.

getting the value for 'path'

in addition to the parameters described above you can use the optional parameters maxhits and showsearchcategories . the maxhits parameter specifies the maximal number of results to return and its value ranges between 1 and 500. the user settings group by categories can be overridden by showsearchcategories=true or by showsearchcategories=false .

if you do not pass the turing test because you are not human you may be interested in the more machine-readable search results in xml. the xml document is available at /search?phrase=… and includes also the scoring. the parameter phrase is equal to the searchword parameter described above. the maximal number of results is limited to 1,000 ( maxhits is not supported). the xml search results can be easily used in scripts. for example, this little ant script finds common misspellings by querying for each item of wikipedia’s list of common misspellings . it finds 131 typos in the current luna help with only a very low false positive rate.

the next little known things about the eclipse infocenter on my list are language switching and debugging information . stay tuned!

Eclipse Links

Published at DZone with permission of Holger Voormann, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Ultra-Fast Microservices: When Microstream Meets Payara
  • Top Soft Skills to Identify a Great Software Engineer
  • A Smarter Redis
  • Synchronization Methods for Many-To-Many Associations

Comments

Java Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo