Allow changing the file extraction format

Created on 3 July 2024, 9 months ago
Updated 7 August 2024, 8 months ago

Feature

Hey, it would be awesome if we could add an option to set the extract format in the SearchApiSolrBackend->extractContentFromFile() method.

Proposed solution>

1. Add an extra parameter to the function called $format, and set it to Query::EXTRACT_FORMAT_TEXT by default.
2. Include a $query->setExtractFormat(Query::EXTRACT_FORMAT_TEXT) call in the function.
3. Update the current tests to reflect this change.

✨ Feature request
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine taraskorpach Lutsk πŸ‡ΊπŸ‡¦

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @taraskorpach
  • Status changed to Active 9 months ago
  • πŸ‡©πŸ‡ͺGermany mkalkbrenner πŸ‡©πŸ‡ͺ

    Feel free to provide a patch.

  • Status changed to Needs review 9 months ago
  • πŸ‡ΊπŸ‡¦Ukraine taraskorpach Lutsk πŸ‡ΊπŸ‡¦

    I've added an MR, but here are some errors with unit tests.

    Unfortunately, I don't know how to handle the Solr instance requirement during PHPUnit tests. I'll let you figure it out :)

  • Pipeline finished with Failed
    9 months ago
    Total: 3723s
    #218798
  • Status changed to Needs work 9 months ago
  • πŸ‡©πŸ‡ͺGermany mkalkbrenner πŸ‡©πŸ‡ͺ

    From our project page and README:

    Our test suite includes integration tests that require a real Solr server. This
    requirement can't be provided by the drupal.org test infrastructure.
    Therefore we leverage travis and github actions for our tests and had to establish a more complex workflow:

    1. open an issue on drupal.org as usual
    2. upload the patch for being reviewed to that issue on drupal.org as usual
    3. fork https://github.com/mkalkbrenner/search_api_solr
    4. apply your patch and file a PR on github
    5. add a link to the github PR to the drupal.org issue

    The PR on github will automatically tested by travis or github actions and the test results will
    be reflected in the PR conversation.

  • Status changed to Needs review 9 months ago
  • πŸ‡ΊπŸ‡¦Ukraine taraskorpach Lutsk πŸ‡ΊπŸ‡¦

    Sorry for my ignorance :)

    I've added a new PR on github.
    Attaching a patch here as well.

  • Status changed to Fixed 9 months ago
  • πŸ‡©πŸ‡ͺGermany mkalkbrenner πŸ‡©πŸ‡ͺ
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024