We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24374
    • 322 Posts
    fieldPotency is not working at all for me. I get this error message:
    Warning: array_multisort() [function.array-multisort]: Array sizes are inconsistent

    AND the results are not sorted at all as specified by the property
    &fieldPotency=`pagetitle:50,content:10`

    I'm using Revolution 2.2.6-pl. Even if I just put one field in:
    &fieldPotency=`pagetitle:50`
    I get the errors. EVERY resource has a pagetitle, so there shouldn't be any array problem.
      • 5811
      • 1,717 Posts
      As lot of issues have been corrected you should install the release 1.0.1 release. See http://modx.com/extras/package/advsearch

      Anyway take care an issue exists with the field potency option. See https://github.com/Coroico/AdvSearch/issues/27
        • 24374
        • 322 Posts
        OK. That's weird, the update isn't showing in Package Management, so I didn't notice there was a newer version.

        I installed the update and cleare the cache. I'm not getting the error messages, but I'm still notting getting the type or ordering I'm expecting. I entered "pagetitle:150,content:10", and when I search for a single word, I get five pages with that word on it, and only at the sixth page do I get the page that has that word in its title. Additionally, that page has the single word in the content six times. Shouldn't that page show up first? The pages that appear in the first five pages of search results have the word in the content only once or twice. Here's my snippet call:

        [[!AdvSearch?
        &perPage=`5`
        &showExtract=`5`
        &hideMenu=`2`
        &pagingType=`2`
        &withTVs=`RightSidebar`
        &fieldPotency=`pagetitle:150,content:50,createdon:1`
        ]] [ed. note: rainbowtiger last edited this post 11 years, 3 months ago.]
          • 24374
          • 322 Posts
          I just read the note about fieldPotency only sorting each paginated page of results. It should definitely be applied BEFORE pagination!! Any plans on getting that fixed? [ed. note: rainbowtiger last edited this post 11 years, 3 months ago.]
          • This was driving me bananas and so in a fit of stupid rage i just added &sortyby=`score DESC`, and now potency works...
              Mat Dave Jones