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

feat: exact match modifier for fulltext #2208

Closed
wants to merge 4 commits into from

Conversation

lbiedinger
Copy link
Member

No description provided.

Copy link

JIRA ticket: EC-6647

@lbiedinger lbiedinger changed the title "exact match" modifier for fulltext feat: exact match modifier for fulltext Mar 11, 2024
@lbiedinger lbiedinger marked this pull request as ready for review March 11, 2024 16:10
Copy link

Preview deployment: https://pr-2208.portal-js.dev.eanadev.org/

@@ -12,7 +12,7 @@ const FIELD_SUGGEST_CONCEPT = 'concept';
const FIELD_SUGGEST_PLACE = 'place';

const advancedSearchFields = [
{ name: 'fulltext', type: FIELD_TYPE_FULLTEXT },
{ name: 'fulltext', type: FIELD_TYPE_FULLTEXT, supportsExact: true },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of adding supportsExact to specific fields, derive it from the fact the the field type has a query property in the exact modifier.

@@ -1078,6 +1078,7 @@ export default {
"individual": "Individual fields"
},
"modifiers": {
"exact": "exact match",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better if this made grammatical sense when the full rule is read, which Full-text exact match european union does not (whereas Full-text contains european union does).

packages/portal/src/mixins/advancedSearch.js Show resolved Hide resolved
text: this.$t(`search.advanced.modifiers.${mod.name}`)
}))
options: this.advancedSearchModifiers.map((mod) => {
if (mod.name === 'exact' && (this.field !== this.fulltextFieldName)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be derived instead of hard-coded. See comment re supportsExact in the mixin.

Copy link

sonarcloud bot commented Mar 13, 2024

@rwd
Copy link
Contributor

rwd commented Mar 26, 2024

See #2256

@rwd rwd closed this Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants