-
Notifications
You must be signed in to change notification settings - Fork 168
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
solr functionalty was moved to sparate location #2196
Conversation
@@ -1,4 +1,4 @@ | |||
package org.ohdsi.webapi.info; | |||
package org.ohdsi.webapi.extcommon; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't move classes to new package in a minor release. 'info
represents the namespace for classes that convey information about webapi to clients. extcommon
sounds like some sort of 'shared extension', which is very different, and implies some sort of functionality that isn't described. Before making these types of architectural changes, they should be discussed and understood.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reverted moving classes to new package
@ssuvorov-fls - I've created #2201 to describe this issue based on discussion with @alex-odysseus and @chrisknoll. Please review that issue and add anything I may have missed. Thanks! |
Linking to this PR: #1091 which is relevant to the changes that introduced SOLR functionality to the code base and also includes issues/discussions that are relevant to this set of changes too. |
@Autowired | ||
VocabularyService vocabService; | ||
|
||
@Override | ||
public boolean supports(VocabularySearchProviderType type) { | ||
return Objects.equals(type, VocabularySearchProviderType.DATABASE); | ||
public boolean supports(String vocabularyVersionKey) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, it appears that the original implementation provided an API to 'ask' the instance if it supported a particular Type. Ie: if you ask the SOLRSearchProvider if it supports VocabularySearchProviderType.DATABASE, it would return false, and if you asked the DatabaseProvider if it supports VocabularySearchProviderType.SOLR, it would return false. Now, supports seems to work off of a vocabularyVersionKey. This seems like a big divergance between the semantics of the supports()
function. If we want something specific for vocabulary version support, shouldn't we have a function that indicates that we're asking something related to the vocabularyVersion?
|
||
public interface SearchProvider { | ||
boolean supports(String vocabularyVersionKey); | ||
int getPriority(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getPriority
seems out of place here: priority is a something in the context of Source and SourceDaimon. Why would a SearchProvider have a priority?
@chrisknoll I've restored moved classes
|
Perhaps the Concept class should be moved to StandardAnalysisAPI since that repo is designed to store analytic classes, Note: I don't mean create an interface Concept (so that everyone who wants to handle Concept data they have to create their own ConceptImpl class...) The StandardAnalysisAPI can contain POJOs that represent data without behavior. |
My understanding of this PR is to prepare the codebase to be easier to 'extract' the SOLR implementation into a separate library such that WebAPI can be built without SOLR libraries if it isn't required. I'm seeing at least two places that changes were made but I do not see how it applies to this function, and wanted to get clarity:
Additional thoughts on externalizing the search providers: We should probably say away from using WebAPI-specific terms from the provider and interface, specifically anything related to |
|
@ssuvorov-fls I think I found an issue post-merge: When I start up the app but use the default solr settings of
Looking closer at it, I'm not sure where we check in the new code the value of Can you try this on your local env? |
I removed it from code as I think that when we include solr starter then we need to get exception in case of lack of configuration. |
…on to a separate library OHDSI/WebAPI#2201 Based on the idea OHDSI/WebAPI#2196 Referencing the latest Standardized Analysis Utils and Circe 1.5.0 release preparation
No description provided.