This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Search matching only ends of strings #6875
    henryleohenryleo
    Participant

    Awesome!
    I was thinking of using the index table but didnt know if it would work with my custom field value because each post has a long list of comma separated strings: “12345, 12445, 12545, 12645”

    And I need to be able to match from the middle of that list and/or the beginning of a each list value
    (ex: matching “125” as part of “12545” from within the list above)

    Could you please let me know if this is possible and if so I will gladly swap over to using the index table!
    If not – would storing the values in any other way make this easier (without commas, without spaces, etc…)

    Thank you so much for your help btw = you have been most detailed in your responses!
    I know my request is rather odd and I am trying to steer my client to the most efficient and logical solution, but you know how that goes!

    in reply to: Search matching only ends of strings #6865
    henryleohenryleo
    Participant

    Also after testing some more tonight it appears that their publish date is effecting their position in the results. Our target post was older but showed up on top when I set the publish date to today. Even though we have Relevance options set and the snippet you provided it appears to be using the publish date for result ordering…

    Is there a way to set the ordering based on the number of hits a result contains?

    thank you!

    in reply to: Search matching only ends of strings #6864
    henryleohenryleo
    Participant

    Thank you so much for the code snippet! Sorry for delayed response!

    Setting the plugin to show more values did indeed show the target post so the plugin working just fine.
    However the snippet you provided doesnt appear to be working (or maybe I need it to work slightly differently***)

    For example:
    search “12345” shows one post with one make within the custom field
    search “1234” shows 3 posts and the first result contains 3 matches from within the custom field (others have fewer)
    search “123” shows 30+ posts but the first results only contain 1 match while the target post has more then 45 matches and is shown 17th in the list

    *** Is there a way to also apply weight based on the number of matches from within the field? This way a post with more matches shows up first or at least higher in the results?

Viewing 3 posts - 1 through 3 (of 3 total)