mhawksey / wp-evidence-hub

OER Research Hub - WordPress plugin
6 stars 1 forks source link

Is search sporadic/ broken? #26

Closed nfreear closed 10 years ago

nfreear commented 10 years ago

Hi Martin,

Typing "Afric" in the box above gives results, but typing "help" (mentioned in the name/title for the first result) gives no results.

I'm seeing similar issues on LACE, and your demo site,

I've tried logging output in the "statechange" event listener on LACE - see below - no events..?!

Does this look like a bug, or some sort of limitation...?

Thoughts welcome! Thanks,

Nick

nfreear commented 10 years ago

Note, my fix for #25 doesn't appear to have helped (or hindered!) this issue. N.

nfreear commented 10 years ago

As Doug points out below, it turns out that the search currently only matches from the start. The fix is to add matchType: any,

Example

    var stringFilter = new google.visualization.ControlWrapper({
      'controlType': 'StringFilter',
      'containerId': 'control1',
      'options': {
        'filterColumnIndex': c['name'],
        'matchType': 'any',
        'ui': {'label': 'Search',}
      }
    });

Doug Clow Fri Oct 3rd, 05:32pm - Copied to 2 people Hi Nick

Looks good – it appears as it should. But the search query is not working correctly.

With a bit of testing, it seems that it matches iff your search query matches from the start of a record, but gets no results for search terms that appear elsewhere.

Test cases: 'Co' gives two results (Course Signals ... and Context Personalization ...) But 'S' gives no results.

nfreear commented 10 years ago

Pull: #27.