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

Lucene queries for personas returning unexpected results #22872

Closed
swicken-dotcms opened this issue Aug 29, 2022 · 15 comments · Fixed by #23848
Closed

Lucene queries for personas returning unexpected results #22872

swicken-dotcms opened this issue Aug 29, 2022 · 15 comments · Fixed by #23848

Comments

@swicken-dotcms
Copy link
Contributor

Describe the bug
Lucene queries for personas returning unexpected results

Reproduced on: 22.03.2, 22.08

Related ticket: https://dotcms.zendesk.com/agent/tickets/108233

To Reproduce
From a demo starter

  1. Create a new content type called Test CT with a title field and a tag field called testTags that is indexed
  2. Add a contentlet with the persona tag ecoenthusiast
  3. Try a lucene query

Example 1

+contentType:TestCt
+TestCt.testTags("ecoenthusiast")

Example 2

+contentType:TestCt
+TestCt.testTags("ecoenthusiast:persona")

The first time I tried to recreate this only example 2 returned results. The second time, neither are returning results.

Expected behavior
The query should not require :persona appended, this was not required in previous versions. You should only need the name of the persona.

Beyond that, the results seem generally inconsistent. It might have something to do with how we are dealing with : in the query.

@wezell
Copy link
Contributor

wezell commented Nov 7, 2022

Tags are stored at the root level, e.g. +tags:ecoenthusiast

@dsilvam
Copy link
Contributor

dsilvam commented Dec 21, 2022

Hey team! Please add your planning poker estimate with Zenhub @freddyucv @victoralfaro-dotcms

@dsilvam dsilvam self-assigned this Jan 9, 2023
@dsilvam
Copy link
Contributor

dsilvam commented Jan 10, 2023

This is working correctly as commented by @wezell

@dsilvam dsilvam removed their assignment Jan 10, 2023
@freddyucv
Copy link

This is working correctly as commented by @wezell

@bryanboza
Copy link
Member

Tested on release-23.01 and here the results

After do this Lucene Query here the results:
image

We are returning just the first example

@dsilvam dsilvam self-assigned this Jan 11, 2023
@dsilvam
Copy link
Contributor

dsilvam commented Jan 11, 2023

After discussing with @erickgonzalez , the issue is that filtering by +tags:EcoEnthusiast vs +tags:"ecoenthusiast:persona" gives different results.

@dsilvam
Copy link
Contributor

dsilvam commented Jan 18, 2023

PR: #23848

@dsilvam dsilvam removed their assignment Jan 18, 2023
dsilvam added a commit that referenced this issue Jan 19, 2023
dsilvam added a commit that referenced this issue Jan 19, 2023
dsilvam added a commit that referenced this issue Jan 20, 2023
dsilvam added a commit that referenced this issue Jan 20, 2023
dsilvam added a commit that referenced this issue Jan 23, 2023
dsilvam added a commit that referenced this issue Jan 23, 2023
* #22872 Avoid creation of duplicate persona tags

* #22872 remove dup line

* #22872 Upgrade task to get rid of rels to dup tags, and dup tags per se

* #22872 compile errors fix

* #22872 IT for the UT

* #22872 new method in TestDataUtil

* #22872 delete with join for MSSQL. Add task to tasklocator. Add wrapIntransacton annotation
@dsilvam dsilvam added the Merged label Jan 23, 2023
@josemejias07
Copy link

Failed QA - Tested on 23.03_22c57977_SNAPSHOT // Docker // macOS 13.0 // FF v110.0

The below upgrade task should be perform automatically

curl --location --request POST 'http:///api/v1/upgradetask'
--header 'Authorization: Basic YWRtaW5AZG90Y21zLmNvbTphZG1pbg=='
--header 'Content-Type: application/json'
--data-raw '{ "upgradeTaskClass":"com.dotmarketing.startup.runonce.Task230119MigrateContentToProperPersonaTagAndRemoveDupTags"
}
'

@dsilvam
Copy link
Contributor

dsilvam commented Mar 17, 2023

Passed Internal QA again:
This is working as expected. Query cache needs to be deactivated.

@josemejias07 josemejias07 self-assigned this Mar 17, 2023
@josemejias07
Copy link

Approved QA - Tested on 23.03_cb5a2388_SNAPSHOT // Docker // macOS 13.0 // FF v111.0

@bryanboza
Copy link
Member

In order to close this card we need to generate a new starter sire to remove the persona tags.

@wezell
Copy link
Contributor

wezell commented Mar 21, 2023

Not worth holding this card open for this or creating a new starter. Let us make the changes in the starter and they will get picked up when we really need to create a new version.

@bryanboza
Copy link
Member

Waiting for a new starter in order to close.

@bryanboza
Copy link
Member

Fixed, creation of the new starter is pending

@dsilvam dsilvam closed this as completed Mar 22, 2023
@erickgonzalez erickgonzalez added LTS : Next Ticket that will be added to LTS and removed LTS: Priority labels Apr 26, 2023
@erickgonzalez erickgonzalez removed the LTS : Next Ticket that will be added to LTS label Jun 5, 2023
erickgonzalez added a commit that referenced this issue Jun 6, 2023
@erickgonzalez erickgonzalez added the Release : 22.03.7 Included in LTS patch release 22.03.7 label Jun 16, 2023
erickgonzalez added a commit that referenced this issue Jul 5, 2023
@AndreyDotcms AndreyDotcms added the Release : 23.01.4 Included in LTS patch release 23.01.4 label Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

10 participants