Search As You Type question

27 views
Skip to first unread message

gsander

unread,
Feb 16, 2009, 2:22:10 PM2/16/09
to Google Enterprise Labs
I am looking into using search as you type on our Google Mini. I want
the Mini to suggest occupations from a large list we keep in a XML
document. It appears to work this way - if I type 'secretary' it will
suggest everything that starts with 'secretary' like 'secretary of the
defense'. It will not suggest things that include but do not begin
with 'secretary'. For example - If I type in 'secretary' it will not
suggest 'treasury secretary'. Is there a way, using the Google Mini,
to do this? Search as you type looked like the best option but if
there is a better way I would appreciate someone letting me know.

Thanks

Cyrus Mistry

unread,
Feb 16, 2009, 11:03:07 PM2/16/09
to google-ente...@googlegroups.com
Absolutely - search-as-you-type was made to do exactly this. The only
thing you'll have to do is either modify your XML list to be a flat
list in the format that the search-as-you-type sample code expects, or
modify the sample code to read from your XML list instead.

Good luck!

-Cyrus

gsander

unread,
Feb 17, 2009, 11:56:08 AM2/17/09
to Google Enterprise Labs
I either was not clear in my question or I don't understand your
reply. Using my previous example - I want to be able to type
'secretary' and get suggestions that include 'secretary of state' and
'treasury secretary'. So the search term can be anywhere - not just
at the beginning of the suggestion.

Thanks



On Feb 16, 10:03 pm, Cyrus Mistry <cyr...@gmail.com> wrote:
> Absolutely - search-as-you-type was made to do exactly this.  The only
> thing you'll have to do is either modify your XML list to be a flat
> list in the format that the search-as-you-type sample code expects, or
> modify the sample code to read from your XML list instead.
>
> Good luck!
>
> -Cyrus
>
>
>
>
>
>
>
> > I am looking into using search as you type on our Google Mini.  I want
> > the Mini to suggest occupations from a large list we keep in a XML
> > document.  It appears to work this way - if I type 'secretary' it will
> > suggest everything that starts with 'secretary' like 'secretary of the
> > defense'.  It will not suggest things that include but do not begin
> > with 'secretary'.  For example - If I type in 'secretary' it will not
> > suggest 'treasury secretary'. Is there a way, using the Google Mini,
> > to do this?  Search as you type looked like the best option but if
> > there is a better way I would appreciate someone letting me know.
>
> > Thanks- Hide quoted text -
>
> - Show quoted text -

Cyrus Mistry

unread,
Feb 17, 2009, 2:00:02 PM2/17/09
to google-ente...@googlegroups.com
Aah, got it.  Yes, the code can be modified to do what you want.  Basically, you'll need to hash based on *any* word in your list of occupations, not just the first letters of the first word.  The code is relatively straightforward so this should be possible.  Let me know if you or your developer is unsure how to do this.

-Cyrus

gsander

unread,
Feb 17, 2009, 2:39:34 PM2/17/09
to Google Enterprise Labs
That is good news. I am not the developer and we have not had any
developer look at this so far. I am pretty sure he would not know
where to start. Can you tell me where to point him (and anything else
relevant) so he can get into it? If he has specific questions then we
can follow up with you.

Thanks
> > > - Show quoted text -- Hide quoted text -

Cyrus Mistry

unread,
Feb 18, 2009, 12:04:23 AM2/18/09
to google-ente...@googlegroups.com
Sure - happy to help - please feel free to put your developer in touch with me directly if he has any questions, but I really doubt he will have any trouble since the code is very straightforward.

Thanks!

gsander

unread,
Feb 18, 2009, 12:29:03 PM2/18/09
to Google Enterprise Labs
OK - I would like to give him a bit of an idea what he is supposed to
look at.

Will he be editing the XSLT Stylesheet or the search as you type
(search-as-you-type.js, etc) that I downloaded from Google? Or is
there something else he will need to look at? It appears I will need
to direct this to a Java developer. Most of our developers are .NET
but we have a few who work with Java.

Thanks



On Feb 17, 11:04 pm, Cyrus Mistry <cyr...@gmail.com> wrote:
> Sure - happy to help - please feel free to put your developer in touch with
> me directly if he has any questions, but I really doubt he will have any
> trouble since the code is very straightforward.
> Thanks!
>

Cyrus Mistry

unread,
Feb 18, 2009, 3:12:59 PM2/18/09
to google-ente...@googlegroups.com
Should all be in the javascript file.

gregs...@verizon.net

unread,
Feb 18, 2009, 6:23:41 PM2/18/09
to google-ente...@googlegroups.com
After talking to the development team we have more questions.  This project will probably have more than one aspect to it.  The first is that we don't have an available developer to look into this.  Since you said this is not too complex maybe you could just tell me what edits to make to the JavaScript file.  2) After we get the search as you type working we are going to want to incorporate the results into a java web application.  It will need to be a drop down box within a page.  What can you tell the java web developer to get him started on that?  I know that might be out of the scope of what you can do for us but maybe you can point him to where he can get started.

Thanks

Cyrus Mistry

unread,
Feb 18, 2009, 11:39:18 PM2/18/09
to google-ente...@googlegroups.com
Hi Greg,

Unfortunately, I'm not a developer and I don't have any developer resources to assist you.  Perhaps others on this mailing list have done something similar or might be able to assist you?

-Cyrus
Reply all
Reply to author
Forward
0 new messages