Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let's get rid of obj_label_tesim #4262

Open
ndushay opened this issue Nov 3, 2023 · 3 comments
Open

Let's get rid of obj_label_tesim #4262

ndushay opened this issue Nov 3, 2023 · 3 comments
Labels
discovery improvements to discovery tech debt

Comments

@ndushay
Copy link
Contributor

ndushay commented Nov 3, 2023

I had to add it back in to qf for searching in order to make the reports specs ... but could we just use objectId_tesim instead?

Also: _tesim? analyzed as english text?

@ndushay ndushay changed the title do we really need obj_label_tesim do we really need obj_label_tesim? Nov 3, 2023
@ndushay ndushay added discovery improvements to discovery tech debt labels Nov 3, 2023
@ndushay
Copy link
Contributor Author

ndushay commented Nov 8, 2023

Andrew thinks this field is no longer needed, except:

  • maybe used to create collections or apos? (could we use it for something else)
  • maybe used in reports (but could maybe use something else?)

As of Tues Nov 7, 2023, these are the uses in argo app code (there are additional uses in specs):

collections_controller:

def collection_exists?(title:, catalog_record_id:)
    return false unless title || catalog_record_id

    query = "_query_:\"{!raw f=#{SolrDocument::FIELD_OBJECT_TYPE}}collection\""
    query += " AND #{SolrDocument::FIELD_LABEL}:\"#{title}\"" if title
    if catalog_record_id

in reports: (maybe don't need - shouldn't need a fallback from title?)

    {
      field: :title, label: 'Title',
      proc: ->(doc) { doc.title },
      solr_fields: [SolrDocument::FIELD_TITLE,
                    SolrDocument::FIELD_LABEL],
      sort: false, default: true, width: 100
    },

and later:

    {
      field: :citation, label: 'Citation',
      proc: ->(doc) { CitationPresenter.new(doc).render },
      solr_fields: [SolrDocument::FIELD_AUTHOR,
                    SolrDocument::FIELD_TITLE,
                    SolrDocument::FIELD_LABEL,
                    SolrDocument::FIELD_PLACE,
                    SolrDocument::FIELD_PUBLISHER,
                    SolrDocument::FIELD_MODS_CREATED_DATE],
      sort: false, default: false, width: 100
    },

@ndushay ndushay changed the title do we really need obj_label_tesim? Let's get rid of obj_label_tesim Nov 8, 2023
@ndushay
Copy link
Contributor Author

ndushay commented Feb 10, 2024

I wonder if we can do away with the field altogether.

I couldn't figure out how to do that for

  • collections controller
  • reports

specs:

  • spec/features/date_range_form_spec
  • spec/models/report_spec
  • spec/requests/create_collections_spec

@ndushay
Copy link
Contributor Author

ndushay commented Feb 27, 2024

Andrew remains strongly in favor of getting rid of this field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discovery improvements to discovery tech debt
Projects
None yet
Development

No branches or pull requests

1 participant