I don't know if there's any way to do this because it just uses Amazon's API, but the autocomplete results that are presented in the field widget are almost useless.

See attached screenshot of what appeared when I entered "ipod".

And then look at the next screenshot of what comes up when I search Amazon's site for "ipod".

Comments

rfay’s picture

Take a look at what's being done for the search, and then you can take a look at how the search request can be narrowed. For example, it might be that we need a "category" select next to the search, or other ways to narrow the search.

Note that more specific searches do better of course.

The search may not be by title... maybe it's by everything?

shawn dearmond’s picture

In digging around with this, I found that the Amazon field module uses a "Blended" search, which means that the search is over all categories. That makes sense.

After some involved Googling, I discovered that Amazon API doesn't allow for a "sort" parameter with "Blended" searches.

See: https://forums.aws.amazon.com/thread.jspa?threadID=7057

Maybe a category select is a good idea.

shawn dearmond’s picture

Wow. Talk about night and day. This patch totally fixes the problem.

All I did was change the SearchIndex from "Blended" to "All".

See attached screenshot for proof.

shawn dearmond’s picture

Status: Active » Needs review
rfay’s picture

Status: Needs review » Fixed

Committed: a4e5a5abb01c3437c13dc0b664300c18e54af478

rfay’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Fixed » Patch (to be ported)

Let's fix this in D6 as well.

the_g_bomb’s picture

I backported this to 6.x-1.x, but found another instance of the Blended being set as the SearchIndex, so thought I would provide 2 patches one with the changes that were implemented in the D7 branch and one with both Instances of Blended being removed.

I haven't had a chance to double check if both need to be replaced, hence the 2 patches.
amazon-field_autocomplete_results-1127540-5.patch implements the above fix which is also commit fa68aa5 on 6.x-1.x.

The second patch removes the second instance only.

the_g_bomb’s picture

Status: Patch (to be ported) » Needs review

I'll check the second patch at some point if someone else doesn't beat me to it.

  • rfay committed a4e5a5a on 7.x-2.x
    Issue #1127540 by Shawn DeArmond: Improve autocomplete results