Advanced Search Question

I’m having an odd problem with my institution’s Advanced Search. So, I’m in Advanced Search (which I know only searches items and not files), and I put in one keyword in the field. The examples I tried were both “dog” and “brown”. For either of these searches, I get multiple results. Then I try another search combining these two keywords. This time “dog brown”. And I get zero results. I know that both of these terms are in the title of an item - but the Advanced Search won’t pick it up. So basically - one keyword works, but multiple keywords does not.

Any suggestions on what might be happening?

1 Like

The “Search for Keywords” field on the Advanced Search is misleading. It searches the query entered in the field as an exact substring of any item metadata. Therefore, if your title was “The Brown Dog Runs”, “brown” “dog” and “brown dog” would all match, but not “dog brown”. In SQL parlance, the last example would use LIKE "%dog brown%". This also means that there is no ranking of results which use your search query more frequently.

The other built-in search does use a full text index provided by MySQL, so it will search for each word individually and rank results based on occurrence. The main downside is that due to the way that Omeka builds the index, there is no way to filter the results by any other fields like the Advanced Search can. There are also limitations to the index, such as a default to ignore words that are less than three characters long.

Another option is the Solr Search plugin. It uses an external search index server that does the best query matching and ranking. It also provides facets to limit results by various fields, but does not provide the amount of filters the Advance Search does.

My institution is dealing with a similar issue. Is there any way to modify the “Search for Keywords” field in the Advanced Search to submit as a boolean search? This would be much more robust for our collection.

It may be possible by modifying the Omeka application code, but I’m not aware of anyone who has done that. Here is the function that builds the part of the search query for “Search for Keywords” in the advanced search:

Hi ,

I have a similar question.
I wonder why the advanced search form is not simply a replication of the “side advanced search form” which is way more efficient, precise and less misleading to anyone searching content in a website.

Here is the side search form which really works (it searches for all types of content : items, exhibits, files, simple pages… and you can filter by them) :

How can I replicated this simple and clear form in the advanced search? and then just add some other filters (like exhibits)… For now I had to narrow my advanced search to a full text search OR a search by exhibits, but no way to link them together) :

with :

if (!empty($formActionUri)):
    $formAttributes['action'] = $formActionUri;
    $formAttributes['action'] = url(array('controller' => 'items',
                                          'action' => 'browse'));
$formAttributes['method'] = 'GET';

<form <?php echo tag_attributes($formAttributes); ?>>

Ou chercher par exposition :

    <?php fire_plugin_hook('public_items_search', array('view' => $this)); ?>
        <?php if (!isset($buttonText)) {
            $buttonText = __('Search for items');
        } ?>
        <input type="submit" class="submit" name="submit_search" id="submit_search_advanced" value="<?php echo $buttonText ?>">


I would rather have the full side simple search form instead. But I don’t know where to find it…

If anyone can help, It would be wonderfull …

Thanks !

I think the “side advanced search form” you are looking for is in application/views/scripts/search/search-form.php:

The advanced search form is specified in application/views/scripts/items/search-form.php, so you could add or update the items/search-form.php file in your theme to change the advanced search.