Two questions about recent advanced search facets

72 views
Skip to first unread message

Michael Levy

unread,
Dec 29, 2014, 2:53:48 PM12/29/14
to blacklight-...@googlegroups.com
I'm working off Blacklight 5.5.3 (and plan to upgrade soon).

(a) Should I be able to do a query facet in advanced search the same way that it's done as a regular Blacklight facet? I haven't tried yet and wanted to ask first before digging in.

(b) Advanced facets are not showing 'More' when there are more than :limit results. I imagine this means I'm doing something wrong. Any ideas of first places to look?

Thanks!

Jonathan Rochkind

unread,
Dec 29, 2014, 3:11:57 PM12/29/14
to blacklight-...@googlegroups.com
I wrote a large chunk of the advanced search plugin, although others
have modified it since then.

On 12/29/14 2:53 PM, Michael Levy wrote:
> I'm working off Blacklight 5.5.3 (and plan to upgrade soon).
>
> (a) Should I be able to do a query facet in advanced search the same way
> that it's done as a regular Blacklight facet? I haven't tried yet and
> wanted to ask first before digging in.

You're talking about the facets that show up on the advanced search
page, basically allowing you to use them as 'limits' when specifying
your search?

I am not sure. The advanced search plugin was written before BL
supported query facets in any documented way. And I don't know if it
ever got directed attention to make it support query facets. But it was
written to try to use the underlying BL Solr querying code, so it's
possible it will just work.

>
> (b) Advanced facets are not showing 'More' when there are more than
> :limit results. I imagine this means I'm doing something wrong. Any
> ideas of first places to look?

I'm also not entirely sure, but I think the advanced search form 'limit'
facet UI was not written to support 'more', and does not do so. The
particular 'more' UI from the search results, seems to me of dubious
usefulness in this context, as a 'limit' UI.

You can, however, configure the the number of facet values shown on the
advanced search form 'limit' facets to be different than the number
shown on your ordinary search results facet page.

What I do, for facets with at most several hundred unique facet values,
is set the limit to -1 (no limit) for the advanced search form 'limit'
facets -- but then use chosen.js to get a reasonable UI for displaying
hundreds of different options as a 'limit' on the form. This is
described in the docs:
https://github.com/projectblacklight/blacklight_advanced_search#facets-on-advanced-search-form

For facets with thousands or more unique facet values -- I do not use
them as limit on the advanced search form, I don't think they are
appropriate there.

Hope this helps!

>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Blacklight Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to blacklight-develo...@googlegroups.com
> <mailto:blacklight-develo...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Jonathan Rochkind

unread,
Dec 29, 2014, 3:16:28 PM12/29/14
to blacklight-...@googlegroups.com
Actually, a couple more things. I think query facets very probably won't
work with advanced search at present.

And if you want to see a demo of the "chosen.js" approach for facets
with several hundred unique values, the advanced search form here at JH
demos:

I should prob update the docs with a better example of how to do that,
looks like the README still says 'in progress', but I am using it in
production (with Blacklight 5.8.0 and blacklight_advanced_search 5.1.1;
it's always possible it's broken since then). If you are interested and
can't figure it out, I'll try to document better.

Jonathan

Michael Levy

unread,
Dec 29, 2014, 3:19:17 PM12/29/14
to blacklight-...@googlegroups.com
Thanks Jonathan. Very helpful.

Michael Levy

unread,
Aug 6, 2015, 8:40:49 AM8/6/15
to Blacklight Development
Hello everyone. I am still interested in adding 'More' functionality in the advanced search. For the main Blacklight application it's easy to "Paginate facets. The first n will show up on the search results page, and any additional results appear in a modal." I would like to have something similar in the advanced search facet limit, so that if we have, say, 100 or 300 values for a facet limit, there is a way to show all of them to users to allow them to select. I'm using BL 5.5.2 currently. I have read about the chosen.js but have a request to allow users to browse all values, but it makes more sense to have this on the advanced page. An alternative for us could be to create a Solr facet browse capability entirely outside Blacklight with links to Blacklight, but if it is something that I could implement, it would be nice to get it into Blacklight's own advanced search.
Reply all
Reply to author
Forward
0 new messages