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.

CommentFileSizeAuthor
#6 3458825.patch3.63 KBtaraskorpach
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

taraskorpach created an issue. See original summary.

mkalkbrenner’s picture

Priority: Major » Normal
Status: Needs work » Active

Feel free to provide a patch.

taraskorpach’s picture

Status: Active » Needs review

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 :)

mkalkbrenner’s picture

Version: 4.3.4 » 4.x-dev
Status: Needs review » Needs work

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.

taraskorpach’s picture

Status: Needs work » Needs review
StatusFileSize
new3.63 KB

Sorry for my ignorance :)

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

mkalkbrenner’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.