VuFind

Advanced search not working when you enter more than one search term in each search box

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0
  • Fix Version/s: 1.0RC2
  • Component/s: Search
  • Labels:
    None

Description

If I enter global warming in the first search box and broadcasting corporation in the second search box, I get a solr error.

It works if I enter global warming in the first box and broadcasting in the second search box.

Issue Links

Activity

Hide
Alan Rykhus added a comment -
Hello,

In doing some testing on this I've found that there is a section in Search/home.php that needs to be commented out, Specifically lines 468 to 477:

        // Process Advanced Search
        if (is_array($_GET['lookfor'])) {
            for ($i=0; $i<count($_GET['lookfor']); $i++) {
                if ($_GET['lookfor'][$i] != '') {
                    $search[] = array('field' => $_GET['type'][$i],
                                      'lookfor' => $_GET['lookfor'][$i],
                                      'bool' => $_GET['bool'][$i-1]);
                }
            }
        }

In debugging this I've found that this section of code ends up duplicating the search parameters in the search[] array.

Note 1: This works if you use only a couple of terms. After that you hit the problem as defined in VUFIND-5 "Long or complex searches break due to URL length limitation"

Note 2: While you can limit the result set by selecting facets, when you try to remove an already selected facet the search fails.
Show
Alan Rykhus added a comment - Hello, In doing some testing on this I've found that there is a section in Search/home.php that needs to be commented out, Specifically lines 468 to 477:         // Process Advanced Search         if (is_array($_GET['lookfor'])) {             for ($i=0; $i<count($_GET['lookfor']); $i++) {                 if ($_GET['lookfor'][$i] != '') {                     $search[] = array('field' => $_GET['type'][$i],                                       'lookfor' => $_GET['lookfor'][$i],                                       'bool' => $_GET['bool'][$i-1]);                 }             }         } In debugging this I've found that this section of code ends up duplicating the search parameters in the search[] array. Note 1: This works if you use only a couple of terms. After that you hit the problem as defined in VUFIND-5 "Long or complex searches break due to URL length limitation" Note 2: While you can limit the result set by selecting facets, when you try to remove an already selected facet the search fails.
Hide
Greg Pendlebury added a comment -
I'm not sure how I assign tasks, but I can take this. It will be fixed in the new search object.
Show
Greg Pendlebury added a comment - I'm not sure how I assign tasks, but I can take this. It will be fixed in the new search object.
Hide
Greg Pendlebury added a comment -
VUFIND-134 is the search object ticket.
Show
Greg Pendlebury added a comment - VUFIND-134 is the search object ticket.
Hide
Greg Pendlebury added a comment -
Closing this ticket since it's a non-issue in the search object. VUFIND-5 is peripherally related and will remain open.
Show
Greg Pendlebury added a comment - Closing this ticket since it's a non-issue in the search object. VUFIND-5 is peripherally related and will remain open.

People

Vote (1)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: