Advanced Search with Solr Search plugin

194 views
Skip to first unread message

Anneliese Dehner

unread,
Jun 14, 2016, 6:42:03 PM6/14/16
to Omeka Dev
Has anyone built out the Solr Search plugin to enable advanced searching?

The facets are great, but they require exact matching. I'd like to add the ability to do keyword searches within a specific field or fields...
 "field x" contains "my search term"

It looks like the solr field names are concatenated something like this: element-text-id_t
So I tried constructing a query string with this structure:
.../solr-search?q=60_t:my search term

But I can't get any query strings to work, so I'm definitely missing something(s).

Any pointers are very much appreciated.

Thanks!
Anneliese

p.s. I did inquire about advanced search on the plugin git hub page, but have yet to receive a response. So I'm hoping some/one of you can provide the missing link!

Anneliese Dehner

unread,
Jun 17, 2016, 4:25:47 PM6/17/16
to Omeka Dev
Hello again,

I'm trying to construct a pre-filtered query string to work with the Omeka Solr Search plugin. And I'm wondering if I need to modify schema.xml or another plugin file to get something like the following to work...

/solr-search?q=63_s:Frankfort+AND+62_s:1864

site url, for reference:

Thanks,
Anneliese

John Flatness

unread,
Jun 17, 2016, 5:03:11 PM6/17/16
to omek...@googlegroups.com
I'm not well-versed in the workings of the SolrSearch plugin, but it
looks to me like the plugin's controller specifically filters out colons
in the search term, preventing you from doing what you're trying, at
least in the "q" parameter.

https://github.com/scholarslab/SolrSearch/blob/master/controllers/ResultsController.php#L119

-John
> --
> You received this message because you are subscribed to the Google
> Groups "Omeka Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to omeka-dev+...@googlegroups.com
> <mailto:omeka-dev+...@googlegroups.com>.
> To post to this group, send email to omek...@googlegroups.com
> <mailto:omek...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/omeka-dev.
> For more options, visit https://groups.google.com/d/optout.

Anneliese Dehner

unread,
Jun 17, 2016, 6:01:46 PM6/17/16
to omek...@googlegroups.com
Thanks for your eyes and reply John!

Commenting out the line in ResultsController.php and changing my structure to....
/solr-search?q=63_t:Frankfort+AND+62_t:1864

does the trick!!!

Most excellent.
Thank you.

To unsubscribe from this group and stop receiving emails from it, send an email to omeka-dev+...@googlegroups.com.
To post to this group, send email to omek...@googlegroups.com.

Sarah W

unread,
Jun 17, 2016, 6:11:36 PM6/17/16
to omek...@googlegroups.com
worked for me.

Anneliese Dehner

unread,
Jun 17, 2016, 6:18:42 PM6/17/16
to omek...@googlegroups.com
Thanks Sarah! This is true. 

However, I am interested in doing a keyword search within a field rather than finding exact matches...
I'm going for "date of creation" contains "1864"
instead of "date of creation" is exactly "1864"
Reply all
Reply to author
Forward
0 new messages