Skip to content

Commit

Permalink
wip (removing unneeded changes)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaxelb committed Oct 22, 2024
1 parent 64c0967 commit e15de3d
Show file tree
Hide file tree
Showing 15 changed files with 8 additions and 1,294 deletions.
171 changes: 0 additions & 171 deletions _TODO.txt

This file was deleted.

1 change: 0 additions & 1 deletion share/admin/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ def _search_url_prefix():


def _mappings_url_prefix():
# return reverse('admin:search-index-mappings', kwargs={'index_name': ''})
return '/admin/search-index-mappings/'


Expand Down
1 change: 0 additions & 1 deletion share/models/feature_flag.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class FeatureFlag(models.Model):
ELASTIC_EIGHT_DEFAULT = 'elastic_eight_default'
IGNORE_SHAREV2_INGEST = 'ignore_sharev2_ingest'
SUGGEST_CREATOR_FACET = 'suggest_creator_facet'
TROVESEARCH_POLYSTRAT = 'trovesearch_polystrat'

# name _should_ be one of the constants above, but that is not enforced by `choices`
name = models.TextField(unique=True)
Expand Down
14 changes: 1 addition & 13 deletions share/search/index_strategy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
from .sharev2_elastic5 import Sharev2Elastic5IndexStrategy
from .sharev2_elastic8 import Sharev2Elastic8IndexStrategy
from .trove_indexcard_flats import TroveIndexcardFlatsIndexStrategy
from .trovesearch_indexcard import TrovesearchIndexcardIndexStrategy
from .trovesearch_irivalues import TrovesearchIrivaluesIndexStrategy
from .trovesearch_excessive import TrovesearchExcessiveIndexStrategy
from ._base import IndexStrategy


Expand Down Expand Up @@ -40,9 +37,6 @@ def _iter_all_index_strategies():
if settings.ELASTICSEARCH8_URL:
yield Sharev2Elastic8IndexStrategy(name='sharev2_elastic8')
yield TroveIndexcardFlatsIndexStrategy(name='trove_indexcard_flats')
yield TrovesearchIndexcardIndexStrategy(name='trovesearch_indexcard')
yield TrovesearchIrivaluesIndexStrategy(name='trovesearch_irivalues')
yield TrovesearchExcessiveIndexStrategy(name='trovesearch_excessive')


def get_index_strategy(strategyname: str) -> IndexStrategy:
Expand Down Expand Up @@ -87,12 +81,6 @@ def get_index_for_sharev2_search(requested_name=None) -> IndexStrategy.SpecificI
def get_index_for_trovesearch(params: search_params.CardsearchParams) -> IndexStrategy.SpecificIndex:
if params.index_strategy_name: # specific strategy requested
_name = params.index_strategy_name
elif not FeatureFlag.objects.flag_is_up(FeatureFlag.TROVESEARCH_POLYSTRAT):
_name = 'trove_indexcard_flats'
else:
_name = (
'trovesearch_indexcard'
if TrovesearchIndexcardIndexStrategy.works_with_params(params)
else 'trovesearch_excessive'
)
_name = 'trove_indexcard_flats'
return get_specific_index(_name, for_search=True)
93 changes: 0 additions & 93 deletions share/search/index_strategy/trovesearch_excessive.py

This file was deleted.

Loading

0 comments on commit e15de3d

Please sign in to comment.