Giter Site home page Giter Site logo

Comments (9)

tractorcow avatar tractorcow commented on August 15, 2024

How about having a separate field for each class?

I.e. instead of $index->filterFields['_subsite'] = array( maybe $index->filterFields[$base . '_subsite'] = array( in SearchVariantSubsites?

from silverstripe-fulltextsearch.

tractorcow avatar tractorcow commented on August 15, 2024

On second thought, that would probably break a huge amount of things. :) Maybe the array-base is better, and we just make sure to merge any existing config for subsequent calls to alterDefinition.

This doesn't seem like an easy problem to solve...

from silverstripe-fulltextsearch.

timkung avatar timkung commented on August 15, 2024

Yes, definitely one that will require some decent planning =)

from silverstripe-fulltextsearch.

tractorcow avatar tractorcow commented on August 15, 2024

We're fixing this now. :D Internal issue tracking: https://silverstripe.atlassian.net/browse/OSS-1737

from silverstripe-fulltextsearch.

tractorcow avatar tractorcow commented on August 15, 2024

I can confirm this doesn't just affect subsites, but also versioned.

from silverstripe-fulltextsearch.

tractorcow avatar tractorcow commented on August 15, 2024

I've tested a fix locally that seems to do the job... tractorcow@401afc5

Managed to do this without breaking changes. :)

Note that there is still only ONE field for all objects, but when adding objects multiple types may write to it. That way existing code that filters on that field won't break.

from silverstripe-fulltextsearch.

madmatt avatar madmatt commented on August 15, 2024

So this is fixed by still having a single _subsite field for example, which still only accepts a single int value - and the value might be overwritten by two different variants?

Makes sense for SearchVariantVersioned and SearchVariantSubsites, each document will only have one value for _subsite or _versionedstage.

from silverstripe-fulltextsearch.

dhensby avatar dhensby commented on August 15, 2024

@tractorcow so is this fixed?

from silverstripe-fulltextsearch.

tractorcow avatar tractorcow commented on August 15, 2024

Yep seems to have been merged in a while back https://github.com/silverstripe/silverstripe-fulltextsearch/blob/master/src/Search/Variants/SearchVariant.php

from silverstripe-fulltextsearch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.