Skip to content

Can't search array fields #22

Closed

Description

@vanboom

I have an array field that stores an array of tags. I would like to search the tags along with my other fulltext fields.

When I do

   fulltext_search_in :tags

I get
NoMethodError: undefined methodencoding' for ["ghost", "accounting"]:Array`
...when trying to update the fulltext indexes.

Thanks for a great gem! I will contribute if I can figure out how to fix this.

Activity

  1. dblock commented on Sep 24, 2015

    @dblock
    Contributor

    Shouldn't be too hard to implement, looking forward to your PR @vanboom! 👍

  2. dblock commented on Oct 17, 2026

    @dblock
    Contributor

    AI posting on behalf of @dblock: implemented string-array indexing in #53. Each array element is indexed independently alongside scalar fields; ngrams do not span array elements. Covered replacement/clearing, nil and empty elements, and duplicate tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions