[racket-dev] Tweaked doc pages
Yesterday, Michael Wilber wrote:
> The Google search box seems a bit disorienting to me. Perhaps I just
> learned Racket, say yesterday, and it's unclear what it provides
> that isn't searched by the search box in the top middle. It might be
> nice to integrate that with the results page somehow, like a "Didn't
> find what you're looking for? Here are some Google search results
> for your query on racket-lang.org, stackoverflow, ..."
Yes, I know that it can be confusing -- but I hope that the "Google
Custom Search" label clarifies it a little.
There's no practical way to unify the two searches since they are
implemented in a completely different way all the way to how the end
user interacts with them. For example, the google search box has its
own completion mechanism while our search box doesn't (and instead
does something similar on the search page). Another difference is
that our search goes to a specific search page while the google
results are shown in-line -- it would be nice for our search to be
shown in-line too, but that's impractical since our search is all done
on the client rather than on the server, and you don't want all pages
to load the huge index. This might improve in the future with a
server-backed search that would be used in the on-line version.
As for additional searches -- I think that most of them would get
covered by the google search. For example, google does index
stackoverflow well. The reason that this doesn't happen now is that
the google custom search that I made is restricted to only
docs.racket-lang.org. It would be good to play with it and use more
of their features. They have the concept of "refinments" which, I
think, can be used to have a custom search work as it does now, but
have links at the top that will show results from all sites, or even
add refinments that would show results from stackoverflow etc.
So overall, it would be very helpful if someone looks into all of
these things. Like I said in the other post -- if anyone wants to
play with it I can point you at the general direction...
The beginning is simple -- just do a custom search engine and play
with it. You can use the "advanced" tab with the following two XML
bits which specify my search engine -- the first is the "context" and
the second is the "annotations". (Note that both contain labels that
are specific to my search, so they'll probably need to be edited to
work with a new engine.)
-------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<CustomSearchEngine id="2d2ikbewgwe" creator="017513527831382831574" keywords="" language="en" encoding="UTF-8" enable_suggest="true" enable_promotions="false">
<Title>Racket Documentation</Title>
<Description>Search the most recently released Racket documentation</Description>
<Context>
<BackgroundLabels>
<Label name="_cse_2d2ikbewgwe" mode="FILTER" />
<Label name="_cse_exclude_2d2ikbewgwe" mode="ELIMINATE" />
</BackgroundLabels>
<Synonyms>
<synonymentry word="cons">
<synonym>pair</synonym>
</synonymentry>
</Synonyms>
</Context>
<LookAndFeel code="4" nonprofit="true" googlebranding="watermark" element_layout="2" theme="7" custom_theme="true" text_font="Arial, sans-serif" url_length="full" element_branding="show" enable_cse_thumbnail="true" promotion_url_length="full" ads_layout="2">
<Logo />
<Colors url="#009933" background="#FFFFFF" border="#FFFFFF" title="#1155CC" text="#333333" visited="#1155CC" title_hover="#1155CC" title_active="#1155CC" />
<Promotions title_color="#1155CC" title_visited_color="#1155CC" url_color="#009933" background_color="#F6F6F6" border_color="#F6F6F6" snippet_color="#333333" title_hover_color="#1155CC" title_active_color="#1155CC" />
<SearchControls input_border_color="#D9D9D9" button_border_color="#2F5BB7" button_background_color="#357AE8" tab_border_color="#CCCCCC" tab_background_color="#FFFFFF" tab_selected_border_color="#CCCCCC" tab_selected_background_color="#FFFFFF" />
<Results border_color="#FFFFFF" border_hover_color="#FFFFFF" background_color="#FFFFFF" background_hover_color="#FFFFFF" ads_background_color="#FDF6E5" ads_border_color="#FDF6E5" />
</LookAndFeel>
<AdSense />
<EnterpriseAccount />
<ImageSearchSettings enable="false" />
<commerce_search_security_setting />
<autocomplete_settings match_mode="1" />
<sort_by_keys label="Relevance" key="" />
<sort_by_keys label="Date" key="date" />
</CustomSearchEngine>
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<Annotations start="0" num="1" total="1">
<Annotation about="docs.racket-lang.org/*" score="1" timestamp="0x0004d7164a543986" href="ChZkb2NzLnJhY2tldC1sYW5nLm9yZy8qEIbz0NLk4rUC">
<Label name="_cse_2d2ikbewgwe" />
<AdditionalData attribute="original_url" value="docs.racket-lang.org/*" />
</Annotation>
</Annotations>
-------------------------------------------------------------------------------
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!