• Resolved syrupcore

    (@syrupcore)


    Ran into what is probably an edge case. Hoping there’s a work around though.

    I have a custom field that contains between 1 and 3 numeric characters. I don’t want to set my indexing threshold to a one character word length but I do want this particular field to be searchable. Is there a filter to say “Respect the character indexing minimum except for this field?”

    An alternative question: what’s the danger in setting the indexing threshold to one character? My gut says it’s too low but in testing, it actually seemed fine. Here are the term results:

    # Documents in the index: 634
    
    # 1 character min
    # Terms in the index: 96707
    
    # 2 character min
    # Terms in the index: 95506
    
    # 3 character min
    # Terms in the index: 93612

    In case it matters, the site’s content is pretty fixed (meaning it wont be growing by any significant amount over time like a blog or a news site).

    Cheers.

    https://www.ads-software.com/plugins/relevanssi/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mikko Saari

    (@msaari)

    It just adds more trash to the index, but it’s not a huge deal, especially in your case – just couple of % size increase. Not a problem.

    There’s no easy solution to make the minimum length apply to just one thing, because the same minimum length is used in indexing and in searching.

    So you’re probably just fine with having the minimum at 1.

    Thread Starter syrupcore

    (@syrupcore)

    Cheers, Mikko. Yep, having the minimum set to “1” is working fine in practice.

    There’s no easy solution to make the minimum length apply to just one thing, because the same minimum length is used in indexing and in searching.

    Makes sense. Indexing takes roughly the same time regardless of minimum. When searching for one or two character phrases though, it takes quite a bit longer but that is sort of expected (though I dunno if regular users will be expecting it!). Almost want to say the length doubles with each character removed but I haven’t measured it or anything.

    Plugin Author Mikko Saari

    (@msaari)

    It’s quite possible; especially if you’re using fuzzy search, you’ll be getting a lot more results, and that’ll slow down the search a lot.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Indexing 1-3 Character Custom Fields’ is closed to new replies.