[InterMine Dev] Custom search tools

Thomas TRIPLET thomastriplet at gmail.com
Wed Nov 21 20:21:25 GMT 2012


Thanks Alex for the tip. I understand the javascript part to intercept and
redirect the quick search to my own search function. But then, how do I
return the output of my search functions to KeywordSearchResults.jsp (i.e.
to the normal flow of data).

Basically, we need 2 additional search options: BLAST, and in-house
semantic tools. I was thinking of updating the quick search, and most
importantly, creating a new "advanced search" page, very similar to the
QueryBuilder page and the way it presents the results, but with our own
tools. It would be fantastic for example, if new search components could be
created as easily as new bio sources or using some kind of plugin mechanism.

As far as I know, there's no such mechanism (yet...), so I was wondering
what would be the best way to add new search components on a dedicated page?


Thomas


--
Thomas Triplet, Jr. Eng., Ph.D.
http://www.thomastriplet.net


On Wed, Nov 21, 2012 at 11:59 AM, Alex Kalderimis <alex at intermine.org>wrote:

>
>
> On 21/11/12 16:51, Thomas TRIPLET wrote:
> > Hello,
> > I looked a bit more closely at the issue and have a few questions. In
> > quickSearch.jsp,
>
> The way struts works is that that jsp will be managed by a controller
> (in this case org.intermine.web.struts.KeywordSearchResultsController).
> The flow of control is rather opaque and need a bit of knowledge of
> struts and a thorough reading of the file struts.xml and tiles.xml.
> Rather than hacking the controller, we suggest you use a javascript file
> to intercept the input to this box and send it to your preferred
> destination instead. New javascript files can be added by listing their
> location in your .properties file (eg
> "head.js.all.QUICK_SEARCH_INTERCEPT = my-quick-search.js). You will need
> to bind to the box manually. We can help you with that if you like.
>
> the form is redirected to /keywordSearchResults.do/.
> > The only file I could find with a related name
> > is /keywordSearchResults.jsp/, but from the code, I  looks like this is
> > to display the results, not producing them. So I'm a bit confused. Where
> > does the request to /keywordSearchResults.do/ go and where is the real
> > work done (i.e. querying the db)? And how does it send the output
> > to /keywordSearchResults.jsp/ to display the results?
> > Thanks a lot for your input
> > Thomas
> >
> > --
> > Thomas Triplet, Jr. Eng., Ph.D.
> > http://www.thomastriplet.net
> >
> >
> > On Wed, Nov 21, 2012 at 10:50 AM, Thomas TRIPLET
> > <thomastriplet at gmail.com <mailto:thomastriplet at gmail.com>> wrote:
> >
> >     This is great! I was also wondering whether there is a standard way
> >     to add a tab at the top to offer an advanced search page (next to or
> >     in replacement of the querybuilder), or will I need to hack the
> >     backbone?
> >     Thanks,
> >     Thomas
> >
> >     --
> >     Thomas Triplet, Jr. Eng., Ph.D.
> >     http://www.thomastriplet.net
> >
> >
> >     On Wed, Nov 21, 2012 at 4:35 AM, Radek Stepan <rs676 at cam.ac.uk
> >     <mailto:rs676 at cam.ac.uk>> wrote:
> >
> >         Hello,
> >
> >         you can edit the two JavaScript functions in
> >         intermine/webapp/main/resources/webapp/quickSearch.jsp to
> >         redirect to
> >         a page of your choice passing the value of the input as a
> parameter.
> >         This means you do not need to touch the InterMine Java backend
> >         at all.
> >
> >         Radek
> >
> >         On Tue, Nov 20, 2012 at 10:56 PM, Thomas TRIPLET
> >         <thomastriplet at gmail.com <mailto:thomastriplet at gmail.com>>
> wrote:
> >         > Hello,
> >         > I was wondering how easy it would be to implement custom
> >         search functions to
> >         > extend the quick search. I am thinking in particular of BLAST,
> >         and in-house
> >         > semantic mining tools. The idea would be to redirect the
> >         search button to
> >         > another server, which then returns the output to my instance
> >         of intermine
> >         > and displays the results as a standard intermine table.
> >         > Thanks,
> >         > Thomas
> >         >
> >         > --
> >         > Thomas Triplet, Jr. Eng., Ph.D.
> >         > http://www.thomastriplet.net
> >         >
> >         > _______________________________________________
> >         > dev mailing list
> >         > dev at intermine.org <mailto:dev at intermine.org>
> >         > http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
> >         >
> >
> >
> >
> >
> >
> > _______________________________________________
> > dev mailing list
> > dev at intermine.org
> > http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
> >
>
> _______________________________________________
> dev mailing list
> dev at intermine.org
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.intermine.org/pipermail/dev/attachments/20121121/6a386882/attachment.html>


More information about the dev mailing list