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

allow searchEngine with boolean value at entities #23189

Merged
merged 4 commits into from
Aug 17, 2023

Conversation

mshima
Copy link
Member

@mshima mshima commented Aug 16, 2023

Closes #22867.
Fixes #22866.


Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (below reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@mshima
Copy link
Member Author

mshima commented Aug 16, 2023

@sbouchex can you check if this PR fixes #22866?

@sbouchex
Copy link
Contributor

sbouchex commented Aug 16, 2023

@mshima Does not work in the tests:

My "Tutu" entity is:

{ "changelogDate": "20230816200717", "entityTableName": "tutu", "fields": [ { "fieldName": "name", "fieldType": "String" } ], "name": "Tutu", "pagination": "no", "readOnly": false, "relationships": [], "searchEngine": true, "service": "no" }

And I'm getting the following error:

[INFO] - Generating browser application bundles (phase: setup)... [INFO] ✔ Browser application bundle generation complete. [INFO] ✔ Browser application bundle generation complete. [INFO] [INFO] Error: src/main/webapp/app/entities/tutu/service/tutu.service.ts:55:13 - error TS2552: Cannot find name 'catchError'. Did you mean 'RTCError'? [INFO] [INFO] 55 .pipe(catchError(() => scheduled([new HttpResponse<ITutu[]>()], asapScheduler))); [INFO] ~~~~~~~~~~ [INFO] [INFO] node_modules/typescript/lib/lib.dom.d.ts:17908:13 [INFO] 17908 declare var RTCError: { [INFO] ~~~~~~~~ [INFO] 'RTCError' is declared here. [INFO] [INFO] [INFO] Error: src/main/webapp/app/entities/tutu/service/tutu.service.ts:55:30 - error TS2304: Cannot find name 'scheduled'. [INFO] [INFO] 55 .pipe(catchError(() => scheduled([new HttpResponse<ITutu[]>()], asapScheduler))); [INFO] ~~~~~~~~~ [INFO] [INFO] [INFO] Error: src/main/webapp/app/entities/tutu/service/tutu.service.ts:55:71 - error TS2304: Cannot find name 'asapScheduler'. [INFO] [INFO] 55 .pipe(catchError(() => scheduled([new HttpResponse<ITutu[]>()], asapScheduler))); [INFO] ~~~~~~~~~~~~~ [INFO] [INFO] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE

@mshima mshima marked this pull request as ready for review August 16, 2023 21:08
@mshima mshima changed the title allow searchEngine with falsy value at entities allow searchEngine with boolean value at entities Aug 16, 2023
@sbouchex
Copy link
Contributor

@mshima Java problem now...

`
[INFO] Hibernate JPA 2 Static-Metamodel Generator 6.2.5.Final
[INFO] /home/seb/test-jh/src/main/java/com/mycompany/myapp/config/LocaleConfiguration.java: /home/seb/test-jh/src/main/java/com/mycompany/myapp/config/LocaleConfiguration.java uses or overrides a deprecated API.
[INFO] /home/seb/test-jh/src/main/java/com/mycompany/myapp/config/LocaleConfiguration.java: Recompile with -Xlint:deprecation for details.
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/seb/test-jh/src/main/java/com/mycompany/myapp/web/rest/TutuResource.java:[187,34] cannot find symbol
symbol: method search(java.lang.String)
location: variable tutuRepository of type com.mycompany.myapp.repository.TutuRepository
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33.323 s

`

@mshima
Copy link
Member Author

mshima commented Aug 16, 2023

I don't think true value for searchEngine is supported, it should be elasticsearch or couchbase.
At backend searchEngineAny is not a valid value since implementation should be elasticsearch or couchbase.
Is there any documentation that true value can be used at searchEngine?

@mshima mshima marked this pull request as draft August 16, 2023 21:54
@mshima mshima force-pushed the skip_ci-entity-search-engine branch from 6b565d1 to 1d631ba Compare August 16, 2023 21:58
@mshima mshima marked this pull request as ready for review August 16, 2023 22:27
@mshima
Copy link
Member Author

mshima commented Aug 17, 2023

searchEngine with true will be replaced with the searchEngine from application if the entity belongs to the application.

@sbouchex
Copy link
Contributor

@mshima Look good for me

@DanielFran DanielFran merged commit 31e6037 into jhipster:main Aug 17, 2023
47 checks passed
@mshima mshima deleted the skip_ci-entity-search-engine branch August 17, 2023 10:16
@deepu105 deepu105 added this to the 8.0.0-beta.3 milestone Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/_search/actions endpoint is still generated even if "searchEngine" is false in the entity
4 participants