Customized search interface

95 views
Skip to first unread message

emme...@usgs.gov

unread,
Oct 25, 2011, 6:11:27 PM10/25/11
to islandora
Can anyone provide me with an example of how to customize the
Islandora Solr Advanced Search interface in the following way?

I have three collections in the underlying Fedora repository. I would
like the search interface to allow the user to mark check boxes (or
select from a multi-select list) to specify which of the three
collections to search. There would also be a title and data selection
capability.

There seem to be numerous obstacles to doing this. For one thing the
out-of-the-box configuration of the advanced search interface only
appears to allow searching for a user-entered string (no hidden
elements, radio buttons, etc.). For another thing I'm not sure what
the search term would be (isMemberOfCollection?). I could do a
wildcard search of the PID since all the PIDs for each collection
start with the collection name string, but I'd still have to base it
on which checkboxes or multiple list items are checked/selected.

I could write my own form that submits to the appropriate URL and
passes in the params. it expects but I'm not sure how to define some
of the hidden parameters that I see when I view the source of the Solr
Advanced Search form.

I'm used to writing my UIs for web. applications from scratch and I'm
not sure how I can get the level of customization I need from
Islandora. The out-of-the-box tools seem to be limited or perhaps
there are examples out there that I haven't been able to find.

Alan Stanley

unread,
Oct 25, 2011, 8:04:18 PM10/25/11
to isla...@googlegroups.com
This is an interesting case - you are definitely on the right track.

For each collection you'll want to add "AND rels.isMemberOf:collection\:pid" to the rest of the query (where collection:pid is the PID of your collection).
The easiest way to do what you have in mind would be to write a custom form and submission function.
You could use the default as a model, but add checkboxes to confirm which collections are to be included.

You could see exactly what your query should be by adding an additional three search field repetitions and allowing rels.isMemberOf as one of the searchable fields.
Put your sample query in the first of the boxes, and set the last three boxes to choose rels.isMemberOf from the dropdown, then put the collection pids in the textfields. The displayed query is what you'll be recreating programatically from your custom form. This is for testing only, of course, you'd set search field repetitions back to something more manageable once you had confirmed your results.

This cannot be done through the interface alone, but a small amount of coding will give you the results you need, Let me know if you need any assistance with this.

- Alan

> --
> You received this message because you are subscribed to the Google Groups "islandora" group.
> To post to this group, send email to isla...@googlegroups.com.
> To unsubscribe from this group, send email to islandora+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/islandora?hl=en.
>

emme...@usgs.gov

unread,
Oct 26, 2011, 3:24:32 PM10/26/11
to islandora
I tried what you suggested with adding an additional search field and
adding rels.isMemberOf as a searchable field. I experimented with the
demo:SmileyStuff collection and was never able to get any results.
Specifically I've got:

dc.title ~ Title
rel.isMemberOf ~ Collection

In my search terms box. Then I selected the Collection item from the
search form picklist and tried entering both demo:SmileyStuff and
info:fedora/demoSmileyStuff in the search box. In both cases I got no
search results returned with the query displayed as
rel.isMemberOf:demo:SmileyStuff and rel.isMemberOf:info:fedora/
demo:SmileyStuff respectively. Is my syntax correct? Or is there
some configuration file I need to modify?

The rels-ext predicate for demo:SmileyPens is rel:isMemberOf and the
object is info:fedora/demo:SmileyStuff so I should at least be getting
one object returned.

On Oct 25, 6:04 pm, Alan Stanley <alanjarlathstan...@gmail.com> wrote:
> This is an interesting case - you are definitely on the right track.
>
> For each collection you'll want to add "AND rels.isMemberOf:collection\:pid" to the rest of the query  (where collection:pid is the PID of your collection).
> The easiest way to do what you have in mind would be to write a custom form and submission function.
> You could use the default as a model, but add checkboxes to confirm which collections are to be included.
>
> You could see exactly what your query should be by adding an additional three search field repetitions and allowing rels.isMemberOf as one of the searchable fields.
> Put your sample query in the first of the boxes, and set the last three boxes to choose rels.isMemberOf from the dropdown, then put the collection pids in the textfields.  The  displayed query is what you'll be recreating programatically from your custom form.  This is for testing only, of course, you'd set search field repetitions back to something more manageable once you had confirmed your results.
>
> This cannot be done through the interface alone, but a small amount of coding will give you the results you need,  Let me know if you need any assistance with this.
>
> - Alan
>

Phil Suda

unread,
Oct 20, 2015, 2:51:47 PM10/20/15
to islandora
Any success with this? I would like to search 3 collections on keyword. 

Jared Whiklo

unread,
Oct 20, 2015, 4:01:53 PM10/20/15
to isla...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Phil,

I have something that might help. I wrote a simple newspaper search
screen to allow users to restrict their search to a newspaper or date
or both, etc.

It's not exactly what is proposed here and it is a little old, but it
might help you get a start.

https://github.com/uml-digitalinitiatives/manidora/blob/7.x/includes/new
spaper_search.inc

cheers,
jared
> -- For more information about using this group, please read our
> Listserv Guidelines:
> http://islandora.ca/content/welcome-islandora-listserv --- You
> received this message because you are subscribed to the Google
> Groups "islandora" group. To unsubscribe from this group and stop
> receiving emails from it, send an email to
> islandora+...@googlegroups.com
> <mailto:islandora+...@googlegroups.com>. Visit this group
> at http://groups.google.com/group/islandora. To view this
> discussion on the web visit
> https://groups.google.com/d/msgid/islandora/d8abd5b5-feac-4df4-a3ed-a6
06063c9008%40googlegroups.com
>
>
<https://groups.google.com/d/msgid/islandora/d8abd5b5-feac-4df4-a3ed-a60
6063c9008%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

- --
Jared Whiklo
jwh...@gmail.com
- --------------------------------------------------
I've learned that no matter how much I care, some people are just
jackasses.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)

iEYEARECAAYFAlYmna4ACgkQqhIY384dF1b7kACeOkbLg9pzmAwOlGoj2WVgBFBN
BJIAnj67VZH9MY7egZCJn/UQkZ+UuTvD
=MJpX
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages