When searching with Views, you can select the "Searched fields" to be searched on when configuring the "Fulltext search" filter. Drupal\elasticsearch_connector\ElasticSearch\Parameters\Builder\SearchBuilder::getSearchQueryOptions() however, seems to ignore the selection made there, and adds all fulltext fields known by the search index.

Comments

Cyberwolf created an issue. See original summary.

cyberwolf’s picture

Attaching a patch.

csedax90’s picture

More simple patch attached based on Cyberwolf (tested on latest dev)

csedax90’s picture

Status: Active » Needs review
bander2’s picture

StatusFileSize
new215.43 KB
new266.1 KB

I don't see a choice to select fields on the "Search: Fulltext", but I do on "Global: Combined fields". Is that what we are talking about?

Screenshots attached.

m4olivei’s picture

Seeing the same thing as @bander2 on the latest dev. I don't see the option to select the "Searched fields". Quick look at the code and it's pretty clear why. Here is where those options are conditionally output:

http://cgit.drupalcode.org/elasticsearch_connector/tree/modules/elastics...

In the conditional just above, the check will always fail b/c the body of the getFulltextFields method is completely commented out.

robindh’s picture

Patch for 8.x-5.x Based on #3.

chrlvclaudiu’s picture

Patch for 8.x-5.0--alpha based on #7 and on module's code.

robindh’s picture

Status: Needs review » Reviewed & tested by the community

#8 looks good to me. Marking as RTBC.

  • skek committed a7d023d on 8.x-5.x authored by chrlvclaudiu
    Issue #2849359 by Cyberwolf, sedax, robindh, chrlvclaudiu, bander2:...

  • skek committed 1e8aa6d on 8.x-6.x authored by chrlvclaudiu
    Issue #2849359 by Cyberwolf, sedax, robindh, chrlvclaudiu, bander2:...
skek’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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